From patchwork Wed Jan 4 19:59:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Graeme Russ X-Patchwork-Id: 134345 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 BDE1B1007D7 for ; Thu, 5 Jan 2012 07:01:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2493A28440; Wed, 4 Jan 2012 21:01:08 +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 yIfVyUkKkcaW; Wed, 4 Jan 2012 21:01:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 26E5428441; Wed, 4 Jan 2012 21:00:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7EFCD2841B for ; Wed, 4 Jan 2012 21:00:38 +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 n1Ugt0oyQ0Vm for ; Wed, 4 Jan 2012 21:00: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-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by theia.denx.de (Postfix) with ESMTPS id E4DEA28421 for ; Wed, 4 Jan 2012 21:00:26 +0100 (CET) Received: by mail-vx0-f172.google.com with SMTP id fk13so13532083vcb.3 for ; Wed, 04 Jan 2012 12:00:26 -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 :in-reply-to; bh=7EFItMDA4N0RbP/EAGUIvHInKBChGFEorIK5+ONPvF0=; b=uTLwKuzj1b5bJ7S8APIHWyj8jIRjGJmlZ2lD4hE/dQQqdVN0k5Ze2Y+DMasoSutCpf UghQofJNQzCJ31CMZehupPxryIwljL3CwWYrCZtPSPSdawHkCECTXNLkvcCjqeT7Dda3 lg7URR+rx+c89vBHTCcnRwisB/P7RUTMCNASE= Received: by 10.220.232.9 with SMTP id js9mr33557704vcb.55.1325707226674; Wed, 04 Jan 2012 12:00:26 -0800 (PST) Received: from localhost.localdomain (d110-32-162-141.sbr801.nsw.optusnet.com.au. [110.32.162.141]) by mx.google.com with ESMTPS id eb3sm33049296vdc.5.2012.01.04.12.00.24 (version=SSLv3 cipher=OTHER); Wed, 04 Jan 2012 12:00:26 -0800 (PST) From: Graeme Russ To: u-boot@lists.denx.de Date: Thu, 5 Jan 2012 06:59:48 +1100 Message-Id: <1325707195-3218-10-git-send-email-graeme.russ@gmail.com> X-Mailer: git-send-email 1.7.5.2.317.g391b14 In-Reply-To: <1325707195-3218-1-git-send-email-graeme.russ@gmail.com> References: <1325707195-3218-1-git-send-email-graeme.russ@gmail.com> In-Reply-To: <1325477374-6417-11-git-send-email-graeme.russ@gmail.com> Subject: [U-Boot] [PATCH v2 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 Acked-by: Simon Glass --- Changes for v2: - None arch/x86/lib/board.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) -- 1.7.5.2.317.g391b14 diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 56acf35..a240d26 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