summaryrefslogtreecommitdiff
path: root/arch/m68k/cpu/mcf530x
diff options
context:
space:
mode:
authorangelo@sysam.it <angelo@sysam.it>2016-04-27 19:50:44 (GMT)
committerSimon Glass <sjg@chromium.org>2016-05-17 15:54:43 (GMT)
commit5044c9cc6c4dffb2959769a785663f46cb418461 (patch)
tree3ca99b08de48e0ceff100d5d84bb183a44243a80 /arch/m68k/cpu/mcf530x
parent037734393ef6181e87d85be15468af4baee70b42 (diff)
downloadu-boot-5044c9cc6c4dffb2959769a785663f46cb418461.tar.xz
m68k: add malloc memory for early malloc
To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and call to board_init_f_mem() is added for all cpu's. Signed-off-by: Angelo Dureghello <angelo@sysam.it> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/m68k/cpu/mcf530x')
-rw-r--r--arch/m68k/cpu/mcf530x/cpu_init.c2
-rw-r--r--arch/m68k/cpu/mcf530x/start.S25
2 files changed, 19 insertions, 8 deletions
diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c
index 80dc239..b09eed8 100644
--- a/arch/m68k/cpu/mcf530x/cpu_init.c
+++ b/arch/m68k/cpu/mcf530x/cpu_init.c
@@ -142,7 +142,7 @@ int cpu_init_r(void)
return 0;
}
-void uart_port_conf(void)
+void uart_port_conf(int port)
{
}
diff --git a/arch/m68k/cpu/mcf530x/start.S b/arch/m68k/cpu/mcf530x/start.S
index 097958a..ca8bb32 100644
--- a/arch/m68k/cpu/mcf530x/start.S
+++ b/arch/m68k/cpu/mcf530x/start.S
@@ -126,21 +126,32 @@ _start:
move.l %d0, (%a1)
move.l %d0, (%a2)
+ /* put relocation table address to a5 */
+ move.l #__got_start, %a5
+
+ /* setup stack initially on top of internal static ram */
+ move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
+
/*
- * set stackpointer to internal sram end - 80
- * (global data struct size + some bytes)
- * get some stackspace for the first c-code,
+ * if configured, malloc_f arena will be reserved first,
+ * then (and always) gd struct space will be reserved
*/
- move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp
- clr.l %sp@-
+ move.l %sp, -(%sp)
+ bsr board_init_f_alloc_reserve
- /* put relocation table address to a5 */
- move.l #__got_start, %a5
+ /* update stack and frame-pointers */
+ move.l %d0, %sp
+ move.l %sp, %fp
+
+ /* initialize reserved area */
+ move.l %d0, -(%sp)
+ bsr board_init_f_init_reserve
/* run low-level CPU init code (from flash) */
bsr cpu_init_f
/* run low-level board init code (from flash) */
+ clr.l %sp@-
bsr board_init_f
/* board_init_f() does not return */