[U-Boot] Bug in nand_default_bbt?

Hi Scott, A gentle question on drivers/mtd/nand/nand_bbt.c:largepage_flashbased in Micron devices, the bb marker is the first word. for a x8 device is 1 byte and x16 device it is 2 bytes. .len = 2 makes sense for an x16 device in the above variable, however the marker does a false postive detection for x8 devices. I can over ride this by using nand_chip->badblock_pattern in my board file, but from an mtd layer perspective, does it make sense to fix this for a generic usage? Regards, Nishanth Menon

On Wed, Dec 31, 2008 at 03:31:41PM -0600, Nishanth Menon wrote:
Hi Scott, A gentle question on drivers/mtd/nand/nand_bbt.c:largepage_flashbased in Micron devices, the bb marker is the first word. for a x8 device is 1 byte and x16 device it is 2 bytes. .len = 2 makes sense for an x16 device in the above variable, however the marker does a false postive detection for x8 devices.
Right, simplest way to work around this is to just keep the first two bytes reserved even on x8 devices. If you need to maintain compatibility with a map that doesn't do that, then override the badblock pattern in the driver as you describe.
I can over ride this by using nand_chip->badblock_pattern in my board file, but from an mtd layer perspective, does it make sense to fix this for a generic usage?
Possibly, but that's not a point on which I want to deviate from Linux. Feel free to try to get it changed there.
-Scott
participants (2)
-
Nishanth Menon
-
Scott Wood