[U-Boot] NAND bad block table

Scott Wood scottwood at freescale.com
Wed Feb 12 01:06:10 CET 2014


On Mon, 2014-02-10 at 15:05 +0000, Naveen Mamindlapalli wrote:
> Cc: linux-mtd-list
> 
> Hi Scott,
> 
> Yes, the searching of BBT happens from the end of flash when
> NAND_BBT_USE_FLASH option is used & NAND_BBT_ABSPAGE option is not
> used. The searching of BBT happens by scanning the last 4 blocks for
> BBT signature starting from end block. The number of blocks to scan
> from the end for BBT signature is defined by macro
> NAND_BBT_SCAN_MAXBLOCKS in "include/linux/mtd/bbm.h" which is currently
> set to value 4.
> 
> If the last 4 blocks are factory marked bad by the vendor, then the
> flash is not usable by u-boot or Linux. We can fix this issue by
> changing the macro value NAND_BBT_SCAN_MAXBLOCKS to a value greater
> than 4 (depending on the flash part) which doesn't seem to be a good
> solution since the change has to be done to the MTD layer default
> values.
> 
> It would be good if there is a device tree binding to specify the
> number of blocks to scan to check if BBT is present in the flash.
> Currently there is no such device tree option is available.
> 
> Thanks and Regards,
> Naveen

I see.  I wonder where the value of 4 came from -- it seems a bit small.
The only downside of increasing NAND_BBT_SCAN_MAXBLOCKS would be a
little extra startup latency when no BBT is present, right?

-Scott




More information about the U-Boot mailing list