From: Michael Walle Date: Fri, 26 Mar 2021 19:40:56 +0100 Subject: [PATCH 2/5] armv8: fsl-layerscape: spl: call spl_early_init() In-Reply-To: <20210326184059.23087-1-michael@walle.cc> References: <20210326184059.23087-1-michael@walle.cc> Message-ID: <20210326184059.23087-3-michael@walle.cc> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de DM_SERIAL needs both the device tree as well as an early heap. Thus, we have to call spl_early_init() to initialize the memory allocator and the setup the device tree. Signed-off-by: Michael Walle --- arch/arm/cpu/armv8/fsl-layerscape/spl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c index 888c02f6c5..01dd6a30e8 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -68,12 +69,19 @@ void spl_board_init(void) void board_init_f(ulong dummy) { + int ret; + icache_enable(); /* Clear global data */ memset((void *)gd, 0, sizeof(gd_t)); if (IS_ENABLED(CONFIG_DEBUG_UART)) debug_uart_init(); board_early_init_f(); + ret = spl_early_init(); + if (ret) { + debug("spl_early_init() failed: %d\n", ret); + hang(); + } timer_init(); #ifdef CONFIG_ARCH_LS2080A env_init(); -- 2.20.1