From patchwork Wed Aug 22 23:19:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 179445 X-Patchwork-Delegate: trini@ti.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 27BC42C0084 for ; Thu, 23 Aug 2012 09:23:51 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 69D3A280D9; Thu, 23 Aug 2012 01:23:10 +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 OrmLBoACrGhB; Thu, 23 Aug 2012 01:23:10 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84594280E3; Thu, 23 Aug 2012 01:21:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71863280BF for ; Thu, 23 Aug 2012 01:20:52 +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 Xmn8wcvF2MKI for ; Thu, 23 Aug 2012 01:20:52 +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-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 390A8280C6 for ; Thu, 23 Aug 2012 01:20:14 +0200 (CEST) Received: by mail-pb0-f44.google.com with SMTP id rr4so192818pbb.3 for ; Wed, 22 Aug 2012 16:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=c/jBteTwYjCb6ozDjsQSh1POw/X+oKOwnJvFfZeydr8=; b=RPL6qz1XMjdhiUEipe9n4NfaSZPTwuAotWC/JnDEHC9g+wR/dI9SftYqIMWAWPZnqm GisMq3WJDNaCXjWI/60W2RzF0wpywkg7wAh3X324YE3Z5ulqOuBCuip6RHZvqqHSMKG9 LivMeQ3LIma80j1ttvGCipfLQDlbA9siM1hk/g/xO4iH3yDwEvVVOiSWpfAJJur/8uHo EJUHpV73DmQLqVQQX+s3AmWvRwEMofn5ls+Uej3cX38tXGGWChYIVxMp1PpQ+eMWyFsh zWtZ94VShCRL5keEHz3+/hgztq/to6pzx4JwIZFlGBlSopDfud6oVepDJM8+sWVb68Jm 0xmg== Received: by 10.66.75.225 with SMTP id f1mr49479189paw.35.1345677613427; Wed, 22 Aug 2012 16:20:13 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id oc2sm4594989pbb.69.2012.08.22.16.20.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 16:20:12 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Wed, 22 Aug 2012 16:19:41 -0700 Message-Id: <1345677585-15696-16-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345677585-15696-1-git-send-email-trini@ti.com> References: <1345677585-15696-1-git-send-email-trini@ti.com> Cc: Sudhakar Rajashekhara , Christian Riesch Subject: [U-Boot] [PATCH v3 15/19] spl: Make CONFIG_SPL_FRAMEWORK board_init_f __weak 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 Some platforms may need to do more than simply call relocate_code prior to board_init_r, or perhaps perform more work prior to calling relocate_code. Make our default weak to allow for this. Part of this requires us to add an extern for 'gdata' so that others can also call relocate_code. Signed-off-by: Tom Rini --- common/spl/spl.c | 4 ++-- include/spl.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index b314ed7..d8ade27 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -40,7 +40,7 @@ u32 *boot_params_ptr = NULL; struct spl_image_info spl_image; /* Define global data structure pointer to it*/ -static gd_t gdata __attribute__ ((section(".data"))); +gd_t gdata __attribute__ ((section(".data"))); static bd_t bdata __attribute__ ((section(".data"))); inline void hang(void) @@ -50,7 +50,7 @@ inline void hang(void) ; } -void board_init_f(ulong dummy) +void __weak board_init_f(ulong dummy) { /* * We call relocate_code() with relocation target same as the diff --git a/include/spl.h b/include/spl.h index af9ef71..83e9f21 100644 --- a/include/spl.h +++ b/include/spl.h @@ -41,6 +41,7 @@ struct spl_image_info { extern struct spl_image_info spl_image; extern u32 *boot_params_ptr; +extern gd_t gdata; /* SPL common functions */ void preloader_console_init(void);