From patchwork Mon Jan 3 19:46:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Russ X-Patchwork-Id: 77334 X-Patchwork-Delegate: graeme.russ@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 6636DB70A9 for ; Tue, 4 Jan 2011 06:52:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 579B3283E8; Mon, 3 Jan 2011 20:50:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 40yXb5F2k7et; Mon, 3 Jan 2011 20:50:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 003E4283E9; Mon, 3 Jan 2011 20:49:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A95928384 for ; Mon, 3 Jan 2011 20:49:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L7EMfTbbpNwq for ; Mon, 3 Jan 2011 20:49:38 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTP id 011CE281FA for ; Mon, 3 Jan 2011 20:49:02 +0100 (CET) Received: by mail-fx0-f44.google.com with SMTP id 9so12889169fxm.3 for ; Mon, 03 Jan 2011 11:49:02 -0800 (PST) Received: by 10.223.113.73 with SMTP id z9mr2041059fap.41.1294084142516; Mon, 03 Jan 2011 11:49:02 -0800 (PST) Received: from helios.localdomain6 (d122-104-38-246.sbr6.nsw.optusnet.com.au [122.104.38.246]) by mx.google.com with ESMTPS id a6sm3124092fak.1.2011.01.03.11.48.58 (version=SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 11:49:01 -0800 (PST) From: Graeme Russ To: u-boot@lists.denx.de Date: Tue, 4 Jan 2011 06:46:48 +1100 Message-Id: <1294084016-2674-29-git-send-email-graeme.russ@gmail.com> X-Mailer: git-send-email 1.7.1.422.g049e9 In-Reply-To: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> References: <1294084016-2674-1-git-send-email-graeme.russ@gmail.com> Subject: [U-Boot] [RFC][PATCH 28/36] x86 - Move call to dram_init_f into board_init_f X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de --- arch/i386/cpu/start.S | 3 --- arch/i386/lib/board.c | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) --- 1.7.1.422.g049e9 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;