[U-Boot] [PATCH 1/2] mtd: denali: improve nand_read_oob and fix nand_write_oob

Masahiro Yamada yamada.m at jp.panasonic.com
Thu Apr 24 12:25:23 CEST 2014


Hi Scott, Chin,

On Wed, 23 Apr 2014 02:15:10 -0500
Chin Liang See <clsee at altera.com> wrote:

> On Tue, 2014-04-22 at 14:12 -0500, Scott Wood wrote:
> > On Tue, 2014-04-22 at 10:04 +0900, Masahiro Yamada wrote:
> > > Hi Scott,
> > > 
> > > 
> > > > > It is really really painful to wait more than 10 seconds just for bad block
> > > > > scanning to boot Linux.
> > > > 
> > > > Making bad block scans faster is a good thing, but why do you need to
> > > > scan them just to boot Linux?  Aren't you using an on-flash BBT?
> > > 
> > > I did not know that.
> > > I thought all blocks must be scanned.
> > > 
> > > Could you teach me the better way?
> > 
> > If you use NAND_BBT_USE_FLASH, and NAND_BBT_CREATE is present in the bbt
> > descriptor (this is true of the default descriptors), then the scanning
> > should only need to happen on first use.  On subsequent boots only the
> > bad block table should need to be read.
> 
> Yup, I agreed with this statement :) I believe this bad block table can
> be used by kernel in later stage. Probably someone can comment if I am
> wrong.

It worked for me and it improved bbm checking. Thanks!


BTW,  NAND_BBT_USE_FLASH in denali driver did not work at first.

Finally I figured out it.
denali.c v7 adds the option to nand->options
  nand->options |= NAND_BBT_USE_FLASH;

I had to fix it like this
  nand->bbt_options |= NAND_BBT_USE_FLASH;



Best Regards
Masahiro Yamada



More information about the U-Boot mailing list