[U-Boot] [RFC][PATCH 28/36] x86 - Move call to dram_init_f into board_init_f

Graeme Russ graeme.russ at gmail.com
Mon Jan 3 20:46:48 CET 2011


---
 arch/i386/cpu/start.S |    3 ---
 arch/i386/lib/board.c |    5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/i386/cpu/start.S b/arch/i386/cpu/start.S
index 77f0332..fd018bf 100644
--- a/arch/i386/cpu/start.S
+++ b/arch/i386/cpu/start.S
@@ -93,9 +93,6 @@ car_init_ret:
 	subl	$1b, %ecx
 	movl	%ecx, (GD_LOAD_OFF * 4)(%ebp)

-	/* size memory */
-	call	dram_init_f
-
 	/* Set parameter to board_init_f() to boot flags */
 	movl	(GD_FLAGS * 4)(%ebp), %eax

diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c
index 250bad8..1118322 100644
--- a/arch/i386/lib/board.c
+++ b/arch/i386/lib/board.c
@@ -173,6 +173,8 @@ init_fnc_t *init_sequence[] = {

 gd_t *gd;

+int dram_init_f(void);
+
 /*
  * Load U-Boot into RAM, initialize BSS, perform relocation adjustments
  */
@@ -197,6 +199,9 @@ void board_init_f (ulong boot_flags)

 	gd->flags = boot_flags;

+	if (dram_init_f() != 0)
+		hang();
+
 	/* Calculate destination RAM Address and relocation offset */
 	dest_addr = (void *)gd->ram_size;
 	addr_sp = dest_addr;
--
1.7.1.422.g049e9



More information about the U-Boot mailing list