From patchwork Sat Mar 8 11:16:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 328178 X-Patchwork-Delegate: yorksun@freescale.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 921822C00BB for ; Sat, 8 Mar 2014 22:17:31 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5AC0B4B680; Sat, 8 Mar 2014 12:17:30 +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 1eCaIc+Ts8Y1; Sat, 8 Mar 2014 12:17:30 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D6454B682; Sat, 8 Mar 2014 12:17:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 992EC4B682 for ; Sat, 8 Mar 2014 12:17:26 +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 KG-hVxd286qs for ; Sat, 8 Mar 2014 12:17:22 +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 tx2outboundpool.messaging.microsoft.com (tx2ehsobe002.messaging.microsoft.com [65.55.88.12]) by theia.denx.de (Postfix) with ESMTPS id 0C2424B680 for ; Sat, 8 Mar 2014 12:17:11 +0100 (CET) Received: from mail202-tx2-R.bigfish.com (10.9.14.231) by TX2EHSOBE002.bigfish.com (10.9.40.22) with Microsoft SMTP Server id 14.1.225.22; Sat, 8 Mar 2014 11:17:10 +0000 Received: from mail202-tx2 (localhost [127.0.0.1]) by mail202-tx2-R.bigfish.com (Postfix) with ESMTP id 647592401CD for ; Sat, 8 Mar 2014 11:17:10 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6hzz1de098h8275bh1de097hz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh25cch25f6h2605h1155h) Received: from mail202-tx2 (localhost.localdomain [127.0.0.1]) by mail202-tx2 (MessageSwitch) id 1394277428596754_26058; Sat, 8 Mar 2014 11:17:08 +0000 (UTC) Received: from TX2EHSMHS018.bigfish.com (unknown [10.9.14.230]) by mail202-tx2.bigfish.com (Postfix) with ESMTP id 8CC8144004D; Sat, 8 Mar 2014 11:17:08 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS018.bigfish.com (10.9.99.118) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sat, 8 Mar 2014 11:17:08 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.3.158.2; Sat, 8 Mar 2014 11:17:07 +0000 Received: from b32579-VirtualBox.am.freescale.net ([10.214.84.71]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s28BH05Y020529; Sat, 8 Mar 2014 04:17:04 -0700 From: Prabhakar Kushwaha To: Date: Sat, 8 Mar 2014 16:46:59 +0530 Message-ID: <1394277419-19101-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Cc: yorksun@freescale.com Subject: [U-Boot] [PATCH 5/7][v3] driver/ifc: define nand_spl_load_image() for SPL 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de nand_spl_load_image() can also be used for non TPL framework. Signed-off-by: Prabhakar Kushwaha --- Changes for v2: Sending as it is Changes for v3: Sending as it is drivers/mtd/nand/fsl_ifc_spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c index 2f82f7c..8a7a3a3 100644 --- a/drivers/mtd/nand/fsl_ifc_spl.c +++ b/drivers/mtd/nand/fsl_ifc_spl.c @@ -88,7 +88,7 @@ static inline int bad_block(uchar *marker, int port_size) return __raw_readw((u16 *)marker) != 0xffff; } -#ifdef CONFIG_TPL_BUILD +#if defined(CONFIG_TPL_BUILD) || defined(CONFIG_SPL_BUILD) int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst) #else static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst) @@ -221,7 +221,7 @@ static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst) * Defines a static function nand_load_image() here, because non-static makes * the code too large for certain SPLs(minimal SPL, maximum size <= 4Kbytes) */ -#ifndef CONFIG_TPL_BUILD +#if !defined(CONFIG_TPL_BUILD) && !defined(CONFIG_SPL_BUILD) #define nand_spl_load_image(offs, uboot_size, vdst) \ nand_load(offs, uboot_size, vdst) #endif