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

login
register
mail settings
Submitter Graeme Russ
Date Jan. 3, 2011, 7:46 p.m.
Message ID <1294084016-2674-29-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/77334/
State Superseded
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Jan. 3, 2011, 7:46 p.m.
---
 arch/i386/cpu/start.S |    3 ---
 arch/i386/lib/board.c |    5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

--
1.7.1.422.g049e9

Patch

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;