From: Graeme Russ Date: Tue, 4 Jan 2011 06:46:48 +1100 Subject: [U-Boot] [RFC][PATCH 28/36] x86 - Move call to dram_init_f into board_init_f In-Reply-To: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> References: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> Message-ID: <1294084016-2674-29-git-send-email-graeme.russ@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de --- 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