]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
microblaze: Fix gd_t address which is placed at the end of BRAM
authorMichal Simek <michal.simek@xilinx.com>
Tue, 27 Jan 2015 13:06:14 +0000 (14:06 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 10:59:16 +0000 (12:59 +0200)
Setup gd from ASM to be availalbe for board_init_r.
Setting it up in spl_board_init is too late when
MALLOC is used.
Space for gd is located behind MALLOC area at the end of BRAM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/microblaze/cpu/spl.c
arch/microblaze/cpu/start.S

index 091226133e4fa2c1ae7a2182622951ae8eb74d05..2cc0a2da89e16e48c8c8786e892aeece71af02fa 100644 (file)
@@ -25,8 +25,6 @@ u32 spl_boot_device(void)
 /* Board initialization after bss clearance */
 void spl_board_init(void)
 {
-       gd = (gd_t *)CONFIG_SPL_STACK_ADDR;
-
        /* enable console uart printing */
        preloader_console_init();
 }
index e0e3470a181ab1d6533eb4b891f0c46ffd9c4ed4..14c2f12da06b7cb32c8e510fe3c2c2a8ef5318eb 100644 (file)
@@ -152,6 +152,7 @@ clear_bss:
 #ifndef CONFIG_SPL_BUILD
        brai    board_init_f
 #else
+       addi    r31, r0, CONFIG_SYS_SPL_MALLOC_END
        brai    board_init_r
 #endif
 1:     bri     1b