[U-Boot] [PATCH] add explicit bbt creation to commandline

Steven Zedeck saz at proliphix.com
Fri Feb 12 19:47:51 CET 2010


>> U-Boot supports creating a bad block table in flash, and has done so since
>> before 2008.10 (assuming you're not using legacy NAND).  Whether it does
>> this depends on whether the NAND driver requests it with NAND_BBT_CREATE
>> in
>> nand_bbt_descr.options and NAND_USE_FLASH_BBT in nand_chip.options.
> > 
>> I REALLY appreciate your help. I see in drivers/mtd/nand/nand_bbt.c where
>> it
>>  checks for NAND_BBT_CREATE. What I don't see is where/how this gets set.
>> Is
>> there a config file that sets this?

> It is set in the BBT descriptor struct.  Which NAND driver are you 
> using?  In order for it not to be set, the driver would have to use a 
> non-default BBT descriptor (for bbt_td/bbt_md, not badblock_pattern) and 
> leave out that flag.  I don't see any upstream drivers (at least not 
> under drivers/mtd/nand) that do that, so it should just be a matter of 
> whether the driver specifies NAND_USE_FLASH_BBT in chip->options.

First of all, I inherited much of this code, especially the NAND-related
stuff. I've never needed to go into this portion of the code.

It seems we are using the mtd driver as all our files dealing with nand are
in drivers/mtd/nand. The only place I see NAND_USE_FLASH_BBT being used is
in nand_bbt.c in nand_default_bbt. I see this:

this->options |= NAND_USE_FLASH_BBT;
return nand_scan_bbt (mtd, &agand_flashbased);

Is this what you are referring to?

Also, once we get the BBT created, does the code that loads Linux use that
info ?

Thanks a million.
Steve


-- 
View this message in context: http://old.nabble.com/-PATCH--add-explicit-bbt-creation-to-commandline-tp18299804p27567768.html
Sent from the Uboot - Users mailing list archive at Nabble.com.



More information about the U-Boot mailing list