From: Scott Wood Date: Wed, 12 Mar 2014 13:52:46 -0500 Subject: [U-Boot] [PATCH 5/7] driver/ifc: define nand_spl_load_image() for SPL In-Reply-To: <1394108006-17750-1-git-send-email-prabhakar@freescale.com> References: <1394108006-17750-1-git-send-email-prabhakar@freescale.com> Message-ID: <1394650366.13761.156.camel@snotra.buserror.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 2014-03-06 at 17:43 +0530, Prabhakar Kushwaha wrote: > nand_spl_load_image() can also be used for non TPL framework. > > Signed-off-by: Prabhakar Kushwaha > --- > Changes for v2: 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) When would you ever be building this file without one of those two set? > 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) The reason for exempting SPL was concern that making the function non-static would push some targets over the size limit. Have you successfully built them all, with a variety of compilers? Perhaps this was only an issue on eLBC. -Scott