[U-Boot] [PATCH 4/6] arc: get rid of CONFIG_SYS_GENERIC_GLOBAL_DATA

Alexey Brodkin Alexey.Brodkin at synopsys.com
Tue Mar 17 13:13:33 CET 2015


As discussed on mailing list we're drifting away from
CONFIG_SYS_GENERIC_GLOBAL_DATA in favour to use of board_init_f_mem()
for global data.

So do this for ARC architecture.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
---
 arch/arc/include/asm/config.h | 1 -
 arch/arc/lib/start.S          | 7 ++++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arc/include/asm/config.h b/arch/arc/include/asm/config.h
index b4e9099..450adda 100644
--- a/arch/arc/include/asm/config.h
+++ b/arch/arc/include/asm/config.h
@@ -8,7 +8,6 @@
 #define __ASM_ARC_CONFIG_H_
 
 #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_SYS_GENERIC_GLOBAL_DATA
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 #define CONFIG_ARCH_EARLY_INIT_R
 
diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S
index a9aa2b5..8fcd896 100644
--- a/arch/arc/lib/start.S
+++ b/arch/arc/lib/start.S
@@ -13,9 +13,14 @@ ENTRY(_start)
 	/* Setup interrupt vector base that matches "__text_start" */
 	sr	__ivt_start, [ARC_AUX_INTR_VEC_BASE]
 
-	/* Setup stack pointer */
+	/* Setup stack- and frame-pointers */
 	mov	%sp, CONFIG_SYS_INIT_SP_ADDR
 	mov	%fp, %sp
+	mov	%r0, %sp
+	bl	board_init_f_mem
+	/* Update stack- and frame-pointers */
+	mov	%sp, %r0
+	mov	%fp, %sp
 
 	/* Zero the one and only argument of "board_init_f" */
 	mov_s	%r0, 0
-- 
2.1.0



More information about the U-Boot mailing list