From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 19 Mar 2019 16:56:23 +0100 Subject: [U-Boot] [PATCH 02/11] arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled In-Reply-To: <20190319155632.5680-1-sr@denx.de> References: <20190319155632.5680-1-sr@denx.de> Message-ID: <20190319155632.5680-2-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de This patch adds a call to spl_early_init() to board_init_f() which is needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for the early SPL setup including the DTB setup for later usage. Please note that this call might also be needed for non SPL_OF_CONTROL board, like the smartweb target. But smartweb fails to build with this call because its binary grows too big. So I disabled it for these kind of targets for now. Signed-off-by: Stefan Roese Cc: Heiko Schocher Cc: Andreas Bie=C3=9Fmann Cc: Eugen Hristev --- arch/arm/mach-at91/spl_at91.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index 23ebaa99b1..1065f090e0 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -75,6 +75,16 @@ void __weak spl_board_init(void) =20 void board_init_f(ulong dummy) { +#if CONFIG_IS_ENABLED(OF_CONTROL) + int ret; + + ret =3D spl_early_init(); + if (ret) { + debug("spl_early_init() failed: %d\n", ret); + hang(); + } +#endif + lowlevel_clock_init(); #if !defined(CONFIG_WDT_AT91) at91_disable_wdt(); --=20 2.21.0