diff mbox series

[26/40] spl: call spl_board_init() at the end of the spl init sequence

Message ID 20240724060224.3071065-27-sughosh.ganu@linaro.org
State Superseded
Headers show
Series Make LMB memory map global and persistent | expand

Commit Message

Sughosh Ganu July 24, 2024, 6:02 a.m. UTC
The spl_board_init() function on sandbox invokes the unit
tests. Invoking the tests should be done once the rest of the system
has been initialised. Call the spl_board_init() function at the very
end, once the rest of the initilisation functions have been called,
including the setting up of the LMB memory map.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since rfc: New patch

 common/spl/spl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Simon Glass July 25, 2024, 11:32 p.m. UTC | #1
On Wed, 24 Jul 2024 at 00:04, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> The spl_board_init() function on sandbox invokes the unit
> tests. Invoking the tests should be done once the rest of the system
> has been initialised. Call the spl_board_init() function at the very
> end, once the rest of the initilisation functions have been called,
> including the setting up of the LMB memory map.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since rfc: New patch
>
>  common/spl/spl.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 38ac0608bb..891edde156 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -713,9 +713,6 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 	if (CONFIG_IS_ENABLED(SOC_INIT))
 		spl_soc_init();
 
-	if (CONFIG_IS_ENABLED(BOARD_INIT))
-		spl_board_init();
-
 	if (IS_ENABLED(CONFIG_SPL_WATCHDOG) && CONFIG_IS_ENABLED(WDT))
 		initr_watchdog();
 
@@ -733,6 +730,9 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 		/* Don't fail. We still can try other boot methods. */
 	}
 
+	if (CONFIG_IS_ENABLED(BOARD_INIT))
+		spl_board_init();
+
 	bootcount_inc();
 
 	/* Dump driver model states to aid analysis */