From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1chj94-0005pR-Bl for barebox@lists.infradead.org; Sat, 25 Feb 2017 20:40:48 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Sat, 25 Feb 2017 21:40:20 +0100 Message-Id: <20170225204022.12815-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170225204022.12815-1-u.kleine-koenig@pengutronix.de> References: <20170225204022.12815-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 4/3] mvebu: armada-370-xp: simplify soc init code flow To: barebox@lists.infradead.org VGhpcyBnZXRzIHJpZCBvZiBhIG9mLWZpeHVwIHdoaWNoIGlzIHN0cmFuZ2UgYmVjYXVzZSB0aGUg c29jIGluaXQgc3R1ZmYKaXMgcmVydW4gdGhlbiB3aGVuIGEgbmV3IGR0IGZvciBib290aW5nIGlu dG8gTGludXggaXMgbG9hZGVkLgoKVGhlIGluaXRjYWxsIG11c3QgYmUgcG9zdHBvbmVkIHRvIHBv c3QtY29yZSB0byBlbnN1cmUKb2ZfbWFjaGluZV9pc19jb21wYXRpYmxlIGlzIHdvcmtpbmcgY29y cmVjdGx5LgoKVGhlIGNhbGwgdG8gbXZlYnVfbWJ1c19hZGRfcmFuZ2UgaXMgbW92ZWQgdG8gZHJp dmVycy9idXMvbXZlYnUtbWJ1cy5jIHRvCmVuc3VyZSBpdCdzIHJlZ2lzdGVyZWQgZWFybHkgZW5v dWdoLgoKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xl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