diff options
author | Sekhar Nori <nsekhar@ti.com> | 2019-05-30 19:04:55 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-06-05 12:14:02 -0400 |
commit | 2a766db93810672b9e0f405a35de65bbdcdbaa77 (patch) | |
tree | 0a6e5a6a15692db7e79ad293a8e61a0775bddea9 /arch/arm/mach-davinci | |
parent | 4fddaf2b7d4ab23ec829bb208c892789447779e0 (diff) |
ARM: davinci: SPL: fix BSS initialization
U-Boot README recommends initializing SDRAM in board_init_f(). DA850
was doing it as part of board_init_r() (through call to spl_board_init()
which calls arch_cpu_init() which calls da850_ddr_setup())
This worked fine till commit 15b8c7505819 ("davinci:
da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved
BSS to SDRAM.
Functions like mmc_initialize() called in board_init_r() assume BSS is
available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried
to initialize BSS to 0, BSS is not initialized correctly.
Fix this by simply calling arch_cpu_init() from board_init_f(). Also move
preloader_console_init() there to help debug issues with board_init_r().
With this spl_board_init() is no longer needed, we remove it.
Tested using MMC/SD boot on OMAP-L138 LCDK board.
Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r-- | arch/arm/mach-davinci/spl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c index 103639e347..be3daa9bc0 100644 --- a/arch/arm/mach-davinci/spl.c +++ b/arch/arm/mach-davinci/spl.c @@ -31,9 +31,12 @@ void putc(char c) } #endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */ -void spl_board_init(void) +void board_init_f(ulong dummy) { arch_cpu_init(); + + spl_early_init(); + preloader_console_init(); } |