[U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL

Scott Wood scottwood at freescale.com
Tue Jul 26 20:12:35 CEST 2011


On Tue, 26 Jul 2011 13:04:01 -0500
Scott Wood <scottwood at freescale.com> wrote:

> On Tue, 26 Jul 2011 14:09:16 +0200
> Simon Schwarz <simonschwarzcor at googlemail.com> wrote:
> 
> > diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> > index 8b598f6..cdc9a14 100644
> > --- a/drivers/mtd/nand/Makefile
> > +++ b/drivers/mtd/nand/Makefile
> > @@ -26,12 +26,16 @@ include $(TOPDIR)/config.mk
> >  LIB	:= $(obj)libnand.o
> >  
> >  ifdef CONFIG_CMD_NAND
> > +ifdef CONFIG_SPL_BUILD
> > +COBJS-y += nand_spl.o
> > +else
> >  COBJS-y += nand.o
> >  COBJS-y += nand_base.o
> >  COBJS-y += nand_bbt.o
> > -COBJS-y += nand_ecc.o
> >  COBJS-y += nand_ids.o
> >  COBJS-y += nand_util.o
> > +endif
> > +COBJS-y += nand_ecc.o
> 
> You're assuming all NAND SPLs will want nand_ecc -- this will not fit in
> most current ones.

Well, nand_correct_data is used by some of the SPLs, but the ifdef
CONFIG_NAND_SPL would have to be updated so the rest doesn't get included.

And some SPLs (FSL drivers) don't use anything from that file.

-Scott



More information about the U-Boot mailing list