From patchwork Mon Jan 2 04:09:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Russ X-Patchwork-Id: 133785 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 C696BB6FA1 for ; Mon, 2 Jan 2012 15:11:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 361F928254; Mon, 2 Jan 2012 05:11:11 +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 s0VCpcv19S0L; Mon, 2 Jan 2012 05:11:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 50BFC28255; Mon, 2 Jan 2012 05:10:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B3CF2820F for ; Mon, 2 Jan 2012 05:10:32 +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 fTDxZVOJaquc for ; Mon, 2 Jan 2012 05:10:32 +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-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id B7B2428212 for ; Mon, 2 Jan 2012 05:10:13 +0100 (CET) Received: by mail-yx0-f172.google.com with SMTP id m7so7778296yen.3 for ; Sun, 01 Jan 2012 20:10:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=jTWSwXF/BDi0O9ZLXrObpWMuXdgcmwTrpMJXf/9KGrc=; b=hX9MyIzrl0Fao4d9hP8DMhZ3dAjQ+8JvyoTr1ZeCIt2ytJv+ycfUtbE4Rv6OzuT4Uw 0fMrcsc6Pax8xh76P4vWrXH3aEUp/0tjghVQq/nc5ljPQOnIT30z9fe4vg/YAnkNfL/n sm6nFHHks3a5x2peQbK+l6Q3mSTr5J8ymzCQo= Received: by 10.236.191.134 with SMTP id g6mr25883351yhn.95.1325477413511; Sun, 01 Jan 2012 20:10:13 -0800 (PST) Received: from localhost.localdomain (d58-106-85-147.sbr801.nsw.optusnet.com.au. [58.106.85.147]) by mx.google.com with ESMTPS id 9sm114431452any.3.2012.01.01.20.10.11 (version=SSLv3 cipher=OTHER); Sun, 01 Jan 2012 20:10:13 -0800 (PST) From: Graeme Russ To: u-boot@lists.denx.de Date: Mon, 2 Jan 2012 15:09:27 +1100 Message-Id: <1325477374-6417-11-git-send-email-graeme.russ@gmail.com> X-Mailer: git-send-email 1.7.5.2.317.g391b14 In-Reply-To: <1325477374-6417-1-git-send-email-graeme.russ@gmail.com> References: <1325477374-6417-1-git-send-email-graeme.russ@gmail.com> Subject: [U-Boot] [PATCH 10/17] x86: Allow cache before copy to RAM X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Signed-off-by: Graeme Russ --- arch/x86/lib/board.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index ffddfbe..52e27e1 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -131,16 +131,11 @@ init_fnc_t *init_sequence_f[] = { console_init_f, dram_init_f, calculate_relocation_address, - copy_uboot_to_ram, - clear_bss, - do_elf_reloc_fixups, NULL, }; init_fnc_t *init_sequence_r[] = { - copy_gd_to_ram, - init_cache, cpu_init_r, /* basic cpu dependent setup */ board_early_init_r, /* basic board dependent setup */ dram_init, /* configure available RAM banks */ @@ -269,6 +264,16 @@ void board_init_f(ulong boot_flags) void board_init_f_r(void) { + if (copy_gd_to_ram() != 0) + hang(); + + if (init_cache() != 0) + hang(); + + copy_uboot_to_ram(); + clear_bss(); + do_elf_reloc_fixups(); + /* * Transfer execution from Flash to RAM by calculating the address * of the in-RAM copy of board_init_r() and calling it