Skip to content
Snippets Groups Projects
Commit b4dc0bdd authored by Stefan Roese's avatar Stefan Roese Committed by Wolfgang Denk
Browse files

mpc5200: spl_boot.c: Change init oder to first enable printf


On MPC5200, the initial RAM (and gd) is located in the internal
SRAM. So we can actually call the preloader console init code
before calling initdram(). This makes serial output (printf)
available very early, even before SDRAM init, which has been
an U-Boot priciple from day 1.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent fc959081
No related branches found
No related tags found
No related merge requests found
...@@ -41,13 +41,12 @@ void board_init_f(ulong bootflag) ...@@ -41,13 +41,12 @@ void board_init_f(ulong bootflag)
end_align = (u32)__spl_flash_end; end_align = (u32)__spl_flash_end;
/* /*
* First we need to initialize the SDRAM, so that the real * On MPC5200, the initial RAM (and gd) is located in the internal
* U-Boot or the OS (Linux) can be loaded * SRAM. So we can actually call the preloader console init code
* before calling initdram(). This makes serial output (printf)
* available very early, even before SDRAM init, which has been
* an U-Boot priciple from day 1.
*/ */
initdram(0);
/* Clear bss */
memset(__bss_start, '\0', __bss_end__ - __bss_start);
/* /*
* Init global_data pointer. Has to be done before calling * Init global_data pointer. Has to be done before calling
...@@ -70,6 +69,15 @@ void board_init_f(ulong bootflag) ...@@ -70,6 +69,15 @@ void board_init_f(ulong bootflag)
*/ */
preloader_console_init(); preloader_console_init();
/*
* First we need to initialize the SDRAM, so that the real
* U-Boot or the OS (Linux) can be loaded
*/
initdram(0);
/* Clear bss */
memset(__bss_start, '\0', __bss_end__ - __bss_start);
/* /*
* Call board_init_r() (SPL framework version) to load and boot * Call board_init_r() (SPL framework version) to load and boot
* real U-Boot or OS * real U-Boot or OS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment