diff mbox

[U-Boot,24/32] x86: Move call to dram_init_f into board_init_f

Message ID 1296822959-3927-25-git-send-email-graeme.russ@gmail.com
State Accepted
Commit c869e2ac46a7a8ca00d1fd24c6399ca8e256e244
Delegated to: Graeme Russ
Headers show

Commit Message

Graeme Russ Feb. 4, 2011, 12:35 p.m. UTC
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
---
 arch/i386/cpu/start.S               |    3 ---
 arch/i386/include/asm/u-boot-i386.h |    1 +
 arch/i386/lib/board.c               |    3 +++
 3 files changed, 4 insertions(+), 3 deletions(-)

Comments

Graeme Russ Feb. 12, 2011, 4:30 a.m. UTC | #1
On 04/02/11 23:35, Graeme Russ wrote:
> Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
> ---
>  arch/i386/cpu/start.S               |    3 ---
>  arch/i386/include/asm/u-boot-i386.h |    1 +
>  arch/i386/lib/board.c               |    3 +++
>  3 files changed, 4 insertions(+), 3 deletions(-)
> 

Applied to u-boot-x86

Regards,

Graeme
diff mbox

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/include/asm/u-boot-i386.h b/arch/i386/include/asm/u-boot-i386.h
index 80db52f..7b39bd2 100644
--- a/arch/i386/include/asm/u-boot-i386.h
+++ b/arch/i386/include/asm/u-boot-i386.h
@@ -37,6 +37,7 @@  int register_timer_isr (timer_fnc_t *isr_func);
 
 /* Architecture specific - can be in arch/i386/cpu/, arch/i386/lib/, or $(BOARD)/ */
 int timer_init(void);
+int dram_init_f(void);
 
 /* cpu/.../interrupts.c */
 int cpu_init_interrupts(void);
diff --git a/arch/i386/lib/board.c b/arch/i386/lib/board.c
index e3869d6..1d47a55 100644
--- a/arch/i386/lib/board.c
+++ b/arch/i386/lib/board.c
@@ -197,6 +197,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;