mtd oob test is failing consistently at same places in NAND flash

Philip, Avinash avinashphilip at ti.com
Wed May 9 11:46:17 EDT 2012


On Wed, May 09, 2012 at 20:54:37, Ivan Djelic wrote:
> On Wed, May 09, 2012 at 04:12:05PM +0100, Philip, Avinash wrote:
> > On Wed, May 09, 2012 at 00:15:16, Ivan Djelic wrote:
> > > On Tue, May 08, 2012 at 04:09:46PM +0100, Philip, Avinash wrote:
> > > > On Tue, May 08, 2012 at 18:53:54, Ivan Djelic wrote:
> > > > > On Tue, May 08, 2012 at 01:33:06PM +0100, Philip, Avinash wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > We are having an 8-bit NAND part (MT29F2G08ABAEAWP from 
> > > > > > Micron) connected to GPMC Module (General purpose memory controller) from TI.
> > > > > 
> > > > > Hi,
> > > > > How is ecc performed ?
> > > > > Using NAND internal ecc ? or with GPMC 1-bit Hamming ? 4-bit/8-bit BCH ?
> > > > > Which version of omap2 driver are you using ?
> > > > > Is OOB also ECC-protected ?
> > > > 
> > > > Hardware ECC is performing.
> > > > 4-bit BCH ECC scheme is used.

One correction: we are using 8-bit BCH ECC scheme is used.

> > > > I am using omap2 driver in Linux 3.2.0 Kernel. Don't know omap2 driver version.
> > > 
> > > You are probably using a patched kernel, since 3.2.0 does not have GPMC BCH support ?!
> > > What is your ecc layout ? Does it expose oobfree regions ?
> > >
> > 
> > Yes, we had using patched kernel. OOB free region is exposed.
> > 
> > ECC layout will be as follows.
> > 
> > 0-1	-> BAD block marking
> > 2-57  -> ECC byte position, ( 14 bytes for 512 byte)
> > 58-63 -> oob free bytes
> > 
> > mtd->ecclayout->eccbytes		= 56
> > mtd->ecclayout->eccpos[0]	= 2
> > mtd->ecclayout->oobavail		= 6
> > mtd->ecclayout->oobfree[0].offset	= 58
> > mtd->ecclayout->oobfree[0].length	= 6
> > 
> 
> OK, then it is quite normal that mtd_oobtest should fail when it encounters a bitflip (one that does not match the programmed data) in those unprotected 6 bytes (58-63). What do you think ?


Is this behavior is expected for which OOB area left unprotected?
(I am not sure, What I understood is with failure in OOB area, ECC won't be useful.
Is it ideally we should have ECC protection for OOB area also required?)

Basically I am testing why bit flips is happening in OOB area. Some observation related
to mtd_oob test in the setup we are having is
1. Modify mtd_oob test to write patterns (0x0, 0x55, 0xAA, 0xff), then test is getting passed
for all patterns.
2. On inserting a delay of 10 ms after erase_whole_device() in mtd oob test, test is getting passed.

I can't correlate how test is getting passed on modifying pattern as we are covering all bits in
either of the patterns.

On inserting delay test is getting passed, will point to me some problems in command issue. I am
debugging on this.

Any suggestions will be helpful.

Thanks
Avinash




More information about the linux-mtd mailing list