[PATCH 1/2] mtd: nand: add erased-page bitflip correction

Gupta, Pekon pekon at ti.com
Mon Mar 17 13:50:22 EDT 2014


> On Wed, Mar 12, 2014 at 09:55:19PM -0700, Brian Norris wrote:
> > On Wed, Mar 12, 2014 at 04:06:07PM +0800, Huang Shijie wrote:
> > > On Tue, Mar 11, 2014 at 02:11:51AM -0700, Brian Norris wrote:
> > > > +       /* Check each ECC step individually */
> > > > +       for (i = 0; i < chip->ecc.steps; i++) {
> >
> > [...]
> >
> > > The gpmi uses a NAND layout like this:
> > >
> > >    *    +---+----------+-+----------+-+----------+-+----------+-+
> > >    *    | M |   data   |E|   data   |E|   data   |E|   data   |E|
> > >    *    +---+----------+-+----------+-+----------+-+----------+-+
> > >
> > >         M : The metadata, which is 10 by default.
> > >   E : The ECC parity for "data" or "data + M".
> > >
> > > If you want to count each sector, it makes the code very complicated. :(
> >
> > I see. That does make things complicated.
> >

I have implemented another version of Brian's patch [1], which eliminates
need for chip->ecc.read_page_raw(). Its tested on OMAP NAND driver,
and does not degrade too much performance either. Please see if it works
well with GPMI and pxa3xx-nand controllers too.

[1] [RFC PATCH v2] mtd: nand: add erased-page bitflip correction
http://lists.infradead.org/pipermail/linux-mtd/2014-March/052625.html


with regards, pekon


More information about the linux-mtd mailing list