From: Scott Wood Date: Fri, 6 Dec 2013 19:33:05 -0600 Subject: [U-Boot] [PATCH v2 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL In-Reply-To: <1386224340-30968-1-git-send-email-Po.Liu@freescale.com> References: <1385957560-25365-1-git-send-email-Po.Liu@freescale.com> <1386224340-30968-1-git-send-email-Po.Liu@freescale.com> Message-ID: <1386379985.7375.229.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, 2013-12-05 at 14:18 +0800, Po Liu wrote: > diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c > index 9de327b..93303b4 100644 > --- a/drivers/mtd/nand/fsl_ifc_spl.c > +++ b/drivers/mtd/nand/fsl_ifc_spl.c > @@ -88,7 +88,11 @@ static inline int bad_block(uchar *marker, int port_size) > return __raw_readw((u16 *)marker) != 0xffff; > } > > +#ifdef CONFIG_TPL_BUILD > +void nand_spl_load_image(uint32_t offs, int uboot_size, void *vdst) > +#else > static void nand_load(unsigned int offs, int uboot_size, uchar *dst) > +#endif > { > struct fsl_ifc *ifc = IFC_BASE_ADDR; > uchar *buf = (uchar *)CONFIG_SYS_NAND_BASE; > @@ -105,6 +109,9 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) > > int sram_addr; > int pg_no; > +#ifdef CONFIG_TPL_BUILD > + char *dst = vdst; > +#endif Use uchar to be consistent. > /* Get NAND Flash configuration */ > csor = CONFIG_SYS_NAND_CSOR; > @@ -211,6 +218,15 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst) > } > > /* > ++ * 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 Too many pluses -- did you copy and paste from a patch? > diff --git a/spl/Makefile b/spl/Makefile > index 2a787af..908af35 100644 > --- a/spl/Makefile > +++ b/spl/Makefile > @@ -79,6 +79,7 @@ LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ > LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \ > drivers/power/pmic/ > LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/ > +LIBS-$(CONFIG_SPL_IFC_SUPPORT) += drivers/misc/ Make a CONFIG_SPL_DRIVERS_MISC_SUPPORT instead. -Scott