summaryrefslogtreecommitdiffstats
path: root/arch/m68k/cpu/mcf532x/start.S
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-05-17 13:58:27 -0400
committerTom Rini <trini@konsulko.com>2016-05-17 13:58:27 -0400
commit4b6e1fda107e5244e80ebc41865650ac2873dc88 (patch)
treef448089740af77c2987d12e2dd5b753b7659586f /arch/m68k/cpu/mcf532x/start.S
parent27bec5c12757c80f598b704477c1bc6c250bcb4c (diff)
parent341392dd115f1385c31bb0b034ec15f542730e30 (diff)
downloadtalos-obmc-uboot-4b6e1fda107e5244e80ebc41865650ac2873dc88.tar.gz
talos-obmc-uboot-4b6e1fda107e5244e80ebc41865650ac2873dc88.zip
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'arch/m68k/cpu/mcf532x/start.S')
-rw-r--r--arch/m68k/cpu/mcf532x/start.S27
1 files changed, 22 insertions, 5 deletions
diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S
index 131ad6e392..f25bc541be 100644
--- a/arch/m68k/cpu/mcf532x/start.S
+++ b/arch/m68k/cpu/mcf532x/start.S
@@ -148,17 +148,34 @@ _start:
move.l %d0, (%a1)
move.l %d0, (%a2)
- /* set stackpointer to end of internal ram to get some stackspace for the
- first c-code */
- move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
- clr.l %sp@-
+ /* put relocation table address to a5 */
+ move.l #__got_start, %a5
- move.l #__got_start, %a5 /* put relocation table address to a5 */
+ /* setup stack initially on top of internal static ram */
+ move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
+
+ /*
+ * if configured, malloc_f arena will be reserved first,
+ * then (and always) gd struct space will be reserved
+ */
+ move.l %sp, -(%sp)
+ move.l #board_init_f_alloc_reserve, %a1
+ jsr (%a1)
+
+ /* update stack and frame-pointers */
+ move.l %d0, %sp
+ move.l %sp, %fp
+
+ /* initialize reserved area */
+ move.l %d0, -(%sp)
+ move.l #board_init_f_init_reserve, %a1
+ jsr (%a1)
/* run low-level CPU init code (from flash) */
move.l #cpu_init_f, %a1
jsr (%a1)
/* run low-level board init code (from flash) */
+ clr.l %sp@-
move.l #board_init_f, %a1
jsr (%a1)
OpenPOWER on IntegriCloud