[U-Boot] [RFC 02/10] ARM: omap3/board: add spl specific board_init_f
Jeroen Hofstee
jeroen at myspectrum.nl
Sat May 31 22:32:16 CEST 2014
gd is already setup when calling board_init_f and
preloader_console_init depends on it. Therefore move
the SPL specific part to its own board_init_f as it
prevents the need for a temporarily gd.
---
arch/arm/cpu/armv7/omap3/board.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 9bb1a1c..2e2ec14 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -239,17 +239,22 @@ void s_init(void)
ehci_clocks_enable();
#endif
+ if (!in_sdram)
+ mem_init();
+}
+
#ifdef CONFIG_SPL_BUILD
- gd = &gdata;
+void board_init_f(ulong dummy)
+{
+ /* Clear the BSS. */
+ memset(__bss_start, 0, __bss_end - __bss_start);
preloader_console_init();
-
timer_init();
-#endif
- if (!in_sdram)
- mem_init();
+ board_init_r(NULL, 0);
}
+#endif
/*
* Routine: misc_init_r
--
1.8.3.2
More information about the U-Boot
mailing list