From patchwork Sat Oct 20 22:33:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 192960 X-Patchwork-Delegate: sjg@chromium.org 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 4DEEF2C0087 for ; Sun, 21 Oct 2012 09:35:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE4144A3FF; Sun, 21 Oct 2012 00:34:41 +0200 (CEST) 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 efUQRbT3vqyK; Sun, 21 Oct 2012 00:34:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37A094A440; Sun, 21 Oct 2012 00:33:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 74CD04A429 for ; Sun, 21 Oct 2012 00:33:49 +0200 (CEST) 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 by9F4raaWhVZ for ; Sun, 21 Oct 2012 00:33:48 +0200 (CEST) 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-gg0-f202.google.com (mail-gg0-f202.google.com [209.85.161.202]) by theia.denx.de (Postfix) with ESMTPS id 280DF4A3FA for ; Sun, 21 Oct 2012 00:33:43 +0200 (CEST) Received: by mail-gg0-f202.google.com with SMTP id i4so191744ggm.3 for ; Sat, 20 Oct 2012 15:33:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=n/BTgFRc72L2ziR28/LE6/slwLBfWlEWB/IXXXeQ7co=; b=Wh3VFQtJSUsd9JYrx3AR1ph7moBTya128FTw2FVEDDYYlbRdx50I+tPLngKxGKzzkf Ji+zCACU2wI9l+GjUF4jfaMJVCDbxAM4f9FSuQsYtytL8lxQilVh+dTO3HktWEdIAmlc yfVuihsnl8LPaVLn5HrSFigEVQy9tz4nGkmJjOmS6R4Oa8WKnU1HS9YzIHw/Z0f3+PYK fFbnGj0h9CFsbAqELRwUSoTs74sfNPLpqmuXkSwyYic9nWk+UASM+MQh2lJXTCMHmOuL v8MCSLvYHgWZaEqd3Voph/Nw1cdCzD0GjbTDlodI+kt3Cx+3Iy2NfQQckbgqm3Z+CMo6 Q+2A== Received: by 10.236.126.243 with SMTP id b79mr3141751yhi.35.1350772422804; Sat, 20 Oct 2012 15:33:42 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id i7si465040yhj.6.2012.10.20.15.33.42 (version=TLSv1/SSLv3 cipher=AES128-SHA); Sat, 20 Oct 2012 15:33:42 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 9BD49100049; Sat, 20 Oct 2012 15:33:42 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 5E962160374; Sat, 20 Oct 2012 15:33:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Oct 2012 15:33:10 -0700 Message-Id: <1350772396-28946-7-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1350772396-28946-1-git-send-email-sjg@chromium.org> References: <1350772396-28946-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQm4R35t5KOzOwT0FvBOPvB1E+Sw4pQ2aKkrPb2Xhxyy/KmkVtlTN1Rwad+MLwFRlemmx3DvZOly66vEaf8QImdCtEPPQO9A+YtQDebuwmz5fgAvwiR7wy6wXutCu8g0Q/zPo2oqe5H5Gb3SMpe1HO2SgGFBLu3Wols7UMjy0hyJth4XP0e6Lwfemec3RsAVPphEYs6f Cc: Tom Rini Subject: [U-Boot] [PATCH 06/12] x86: Add a default implementation for cleanup_before_linux() 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 From: Gabe Black This function provides an opportunity for some last minute cleanup and reconfiguration before control is handed over to Linux. It's possible this may need to do something in the future, but for now it's left empty. It's set up as a weak symbol so it can be overridden if necessary on a case by case basis. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- arch/x86/cpu/cpu.c | 5 +++++ arch/x86/include/asm/u-boot-x86.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index e9bb0d7..e8bfe6f 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -121,6 +121,11 @@ void setup_gdt(gd_t *id, u64 *gdt_addr) load_fs(X86_GDT_ENTRY_32BIT_FS); } +int __weak x86_cleanup_before_linux(void) +{ + return 0; +} + int x86_cpu_init_f(void) { const u32 em_rst = ~X86_CR0_EM; diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 878a1ee..a4a5ae0 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -40,6 +40,7 @@ int cpu_init_f(void); void init_gd(gd_t *id, u64 *gdt_addr); void setup_gdt(gd_t *id, u64 *gdt_addr); int init_cache(void); +int cleanup_before_linux(void); /* cpu/.../timer.c */ void timer_isr(void *);