[U-Boot] [PATCH v3 2/8] lpc32xx: mtd: nand: add MLC NAND controller

Albert ARIBAUD albert.aribaud at 3adev.fr
Tue Mar 10 21:33:50 CET 2015


Bonjour Scott,

Le Tue, 10 Mar 2015 13:49:46 -0500, Scott Wood
<scottwood at freescale.com> a écrit :

> On Tue, 2015-03-10 at 13:54 +0100, Albert ARIBAUD wrote:
> > Hi Scott,
> > 
> > Le Mon, 9 Mar 2015 18:51:03 -0500, Scott Wood <scottwood at freescale.com>
> > a écrit :
> > 
> > > On Thu, 2015-03-05 at 07:46 +0100, Albert ARIBAUD (3ADEV) wrote:
> > > > +	while (left) {
> > > > +		if (read_single_page(dst, page) >= 0) {
> > > > +			dst += LARGE_PAGE_SIZE;
> > > > +			page++;
> > > > +			left--;
> > > > +		}
> > > > +	}
> > > 
> > > No bad block skipping?
> > 
> > Hmm... actually the 'left--' should be just after the 'if' block,
> > otherwise not only will the code not skip a bad block, it will actually
> > loop infinitely trying to read it. Will fix in v4. Thanks for pointing
> > this out!
> 
> What causes read_single_page() to fail when there's a bad block marker?
> Especially if the marker is on a different page of the block.  I'm not
> talking about ECC failures (which should not silently be skipped).

Oh gods, I see, sorry. I was indeed mixing up ECC errors and bad block
markers. Show I'm really not good at NAND. :/

I'll look up how other drivers do it and add bad block skipping there.

> -Scott

Cordialement,
Albert ARIBAUD
3ADEV


More information about the U-Boot mailing list