[U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support

Scott Wood scottwood at freescale.com
Wed Mar 5 19:23:27 CET 2014


On Wed, 2014-03-05 at 11:34 -0600, Chin Liang See wrote:
> On Mon, 2014-03-03 at 18:03 -0600, Scott Wood wrote:
> > On Fri, 2014-02-21 at 14:51 -0600, Chin Liang See wrote:
> > > To add the Denali NAND driver support into U-Boot. It required
> > > information such as register base address from configuration
> > > header file  within include/configs folder.
> > > 
> > > Signed-off-by: Chin Liang See <clsee at altera.com>
> > > Cc: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
> > > Cc: David Woodhouse <David.Woodhouse at intel.com>
> > > Cc: Brian Norris <computersforpeace at gmail.com>
> > > Cc: Scott Wood <scottwood at freescale.com>
> > > ---
> > > Changes for v2
> > > - Enable this driver support for SOCFPGA
> > > ---
> > >  drivers/mtd/nand/Makefile      |    1 +
> > >  drivers/mtd/nand/denali_nand.c | 1166 ++++++++++++++++++++++++++++++++++++++++
> > >  drivers/mtd/nand/denali_nand.h |  501 +++++++++++++++++
> > >  3 files changed, 1668 insertions(+)
> > >  create mode 100644 drivers/mtd/nand/denali_nand.c
> > >  create mode 100644 drivers/mtd/nand/denali_nand.h
> > > 
> > > diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> > > index 02b149c..24e8218 100644
> > > --- a/drivers/mtd/nand/Makefile
> > > +++ b/drivers/mtd/nand/Makefile
> > > @@ -39,6 +39,7 @@ obj-$(CONFIG_NAND_ECC_BCH) += nand_bch.o
> > >  obj-$(CONFIG_NAND_ATMEL) += atmel_nand.o
> > >  obj-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
> > >  obj-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
> > > +obj-$(CONFIG_NAND_DENALI) += denali_nand.o
> > >  obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
> > >  obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
> > >  obj-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
> > > diff --git a/drivers/mtd/nand/denali_nand.c b/drivers/mtd/nand/denali_nand.c
> > > new file mode 100644
> > > index 0000000..55246c9
> > > --- /dev/null
> > > +++ b/drivers/mtd/nand/denali_nand.c
> > 
> > It's "denali.c" in Linux -- why "denali_nand.c" here?
> 
> 
> 
> It seems all the existing U-Boot nand driver is using this naming
> standard where <platform>_nand.

Not all -- there's omap_gpmc.c, omap_elm.c, nomadik.c, ndfc.c, etc.

A lot of them have the _nand.c suffix in Linux, too.  Personally, I
think it's redundant.
 
> > > Why PASS/FAIL rather than normal "0 on success, negative error code on
> > error"?  Why uint16_t?
> > 
> 
> 
> Fixed by returning 0 when pass. Also changed uint16_t to uint32_t

Why uint32_t and not int?  Is that return value somewhere used in a
context that expects a NAND hardware status?

-Scott




More information about the U-Boot mailing list