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 1ce2ff-0003AB-Fj for barebox@lists.infradead.org; Wed, 15 Feb 2017 16:43:13 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 15 Feb 2017 17:42:46 +0100 Message-Id: <20170215164248.31952-1-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170214105358.6666-1-u.kleine-koenig@pengutronix.de> References: <20170214105358.6666-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 4/3] mvebu: armada-370-xp: simplify soc init code flow To: barebox@lists.infradead.org VGhpcyBnZXRzIHJpZCBvZiBhIG9mLWZpeHVwIHdoaWNoIGlzIHN0cmFuZ2UgYmVjYXVzZSB0aGUg c29jIGluaXQgc3R1ZmYgaXMKcmVydW4gdGhlbiB3aGVuIGEgbmV3IGR0IGZvciBib290aW5nIGlu dG8gTGludXggaXMgbG9hZGVkLiBJdCBhbHNvIG9ubHkgY2FsbHMKbXZlYnVfbWJ1c19hZGRfcmFu Z2UgaWYgd2UncmUgcnVubmluZyBvbiBhbiBBcm1hZGEgMzcwIG9yIFhQIGFuZCBpbmxpbmVzCmEg c2ltcGxlIGZ1bmN0aW9uLgoKVGhlIGluaXRjYWxsIG11c3QgYmUgcG9zdHBvbmVkIHRvIHBvc3Qt Y29yZSB0byBlbnN1cmUKb2ZfbWFjaGluZV9pc19jb21wYXRpYmxlIGlzIHdvcmtpbmcgY29ycmVj dGx5LgoKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2x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