arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled

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 <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
Stefan Roese 2019-04-02 10:57:16 +02:00 committed by Eugen Hristev
parent e6a2769360
commit ce4d04af99

View File

@ -75,6 +75,16 @@ void __weak spl_board_init(void)
void board_init_f(ulong dummy)
{
#if CONFIG_IS_ENABLED(OF_CONTROL)
int ret;
ret = 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();