From: Scott Wood Date: Thu, 2 Jan 2014 16:01:45 -0600 Subject: [U-Boot] [PATCH v3 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL In-Reply-To: <1386990533-19977-1-git-send-email-Po.Liu@freescale.com> References: <1386224340-30968-2-git-send-email-Po.Liu@freescale.com> <1386990533-19977-1-git-send-email-Po.Liu@freescale.com> Message-ID: <1388700105.11795.19.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 Sat, 2013-12-14 at 11:08 +0800, Po Liu wrote: > diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c > index 9de327b..28656f2 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 > + uchar *dst = vdst; > +#endif Please change the static function signature to match, as fsl_elbc_spl.c does. > diff --git a/spl/Makefile b/spl/Makefile > index 2a787af..7e2adf9 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_DRIVERS_MISC_SUPPORT) += drivers/misc/ > LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/ > LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/ > LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ Document this in README. -Scott