> -----Original Message-----
> From: David Brownell [mailto:[email protected]]
> Sent: Wednesday, March 25, 2009 2:26 PM
> To: [email protected]
> Cc: Narnakaje, Snehaprabha
> Subject: Re: [PATCH 1/3] MTD-NAND: Add support NAND devices up to 4K page
> size and 128bytes OOB
> 
> On Saturday 14 March 2009, [email protected] wrote:
> > From: Sneha Narnakaje <[email protected]>
> >
> > This patch adds support for NAND devices with 4K page
> > size and 128bytes of OOB. In the patch, the macros for
> > max page and oob sizes are updated. The nand_ecclayout
> > data structure is also updated accordingly. Note that
> > The same macros will have to be modified if the support
> > has to be extended up to 8K page size.
> 
> This patch will need to go to the MTD list and LKML.
> (Judging by my experience ... MTD list will be a NOP.)
> 
> But, it will be rejected; see below.  I think some
> other folk were working on 4K page sizes, so maybe
> there's a more accepted solution by now.

The change to "nand_ecclayout" will get rejected. I guess, it was already 
rejected - 
http://lists.infradead.org/pipermail/linux-mtd/2008-September/023082.html

Unfortunately .eccpos is being used in the latest kernels (as against 
2.6.10/2.6.18) to calculate .oobavail in the nand_base.c

If we can come up with another method to calculate .oobavail, we could just 
leave the nand_ecclayout as is (similar to what happened with nand_oobinfo)

Thanks
Sneha

> 
> Agreed that it's time to push a bit on 4K page support,
> since such chips have been shipping for a while now.
> 
> 
> > Signed-off-by: Sandeep Paulraj <[email protected]>
> > Signed-off-by: Sneha Narnakaje <[email protected]>
> > ---
> >  include/linux/mtd/nand.h |    4 ++--
> >  include/mtd/mtd-abi.h    |    4 ++--
> >  2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> > index 27fb694..b2bed22 100644
> > --- a/include/linux/mtd/nand.h
> > +++ b/include/linux/mtd/nand.h
> > @@ -43,8 +43,8 @@ extern void nand_wait_ready(struct mtd_info *mtd);
> >   * is supported now. If you add a chip with bigger oobsize/page
> >   * adjust this accordingly.
> >   */
> > -#define NAND_MAX_OOBSIZE   64
> > -#define NAND_MAX_PAGESIZE  2048
> > +#define NAND_MAX_OOBSIZE   128
> > +#define NAND_MAX_PAGESIZE  4096
> 
> Those are fine ... internal limits, no real problem.
> 
> 
> >
> >  /*
> >   * Constants for hardware specific CLE/ALE/NCE function
> > diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> > index c6c61cd..85d1214 100644
> > --- a/include/mtd/mtd-abi.h
> > +++ b/include/mtd/mtd-abi.h
> > @@ -110,14 +110,14 @@ struct nand_oobfree {
> >     uint32_t length;
> >  };
> >
> > -#define MTD_MAX_OOBFREE_ENTRIES    8
> > +#define MTD_MAX_OOBFREE_ENTRIES    16
> >  /*
> >   * ECC layout control structure. Exported to userspace for
> >   * diagnosis and to allow creation of raw images
> >   */
> >  struct nand_ecclayout {
> >     uint32_t eccbytes;
> > -   uint32_t eccpos[64];
> > +   uint32_t eccpos[128];
> >     uint32_t oobavail;
> >     struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
> 
> This is not fine though.  "nand_ecclayout" is part of the
> public ioctl interface for ECCGETLAYOUT ... this patch
> changes that, and thus breaks all binaries issuing that
> request.  Which means it will get a NAK response.
> 
> 
> >  };
> > --
> > 1.6.0.4
> >
> > _______________________________________________
> > Davinci-linux-open-source mailing list
> > [email protected]
> > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> >
> >
> 
> 
> 

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to