diff options
author | Stefan Roese <sr@denx.de> | 2012-12-06 03:41:57 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2013-03-09 08:14:24 +0100 |
commit | b4dc0bddbf1bfa8697ae888d472c25d82d52dc95 (patch) | |
tree | a7b23c210c17ffa98c681e74e0478383186af1fe /arch | |
parent | fc959081d41aab2d6f4614c5fb3dd1b77ffcdcf4 (diff) | |
download | u-boot-imx-b4dc0bddbf1bfa8697ae888d472c25d82d52dc95.zip u-boot-imx-b4dc0bddbf1bfa8697ae888d472c25d82d52dc95.tar.gz u-boot-imx-b4dc0bddbf1bfa8697ae888d472c25d82d52dc95.tar.bz2 |
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: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/cpu/mpc5xxx/spl_boot.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/powerpc/cpu/mpc5xxx/spl_boot.c b/arch/powerpc/cpu/mpc5xxx/spl_boot.c index 9f14127..080bd58 100644 --- a/arch/powerpc/cpu/mpc5xxx/spl_boot.c +++ b/arch/powerpc/cpu/mpc5xxx/spl_boot.c @@ -41,13 +41,12 @@ void board_init_f(ulong bootflag) end_align = (u32)__spl_flash_end; /* - * First we need to initialize the SDRAM, so that the real - * U-Boot or the OS (Linux) can be loaded + * 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. */ - initdram(0); - - /* Clear bss */ - memset(__bss_start, '\0', __bss_end__ - __bss_start); /* * Init global_data pointer. Has to be done before calling @@ -71,6 +70,15 @@ void board_init_f(ulong bootflag) 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 * real U-Boot or OS */ |