A datasheet from Micron says:

The factory identifies invalid blocks before shipping by programming data 
other than FFh (x8) or FFFFh (x16) into the first spare location (column 
address 2,048 for x8 devices, or column address 1,024 for x16 devices) of 
the first or second page of each bad block.

Which means one should scan the 2nd page too.

Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]>
---

I don't know if this actually happens, whether the manufacturer actually 
ever writes markers to the second page, but that's what the documentation 
says. In fact, we anyway then throw options away in nand_memory_bbt() at 
least for RAM-based BBT. So, don't know if this is really useful. Feel 
free to drop.

diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c
index 7363490..1a0779a 100644
--- a/drivers/mtd/nand/nand_ids.c
+++ b/drivers/mtd/nand/nand_ids.c
@@ -77,14 +77,19 @@ struct nand_flash_dev nand_flash_ids[] = {
        {"NAND 128MiB 3,3V 16-bit",     0xC1, 0, 128, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
 
        /* 2 Gigabit */
-       {"NAND 256MiB 1,8V 8-bit",      0xAA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
-       {"NAND 256MiB 3,3V 8-bit",      0xDA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
-       {"NAND 256MiB 1,8V 16-bit",     0xBA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
-       {"NAND 256MiB 3,3V 16-bit",     0xCA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
+       {"NAND 256MiB 1,8V 8-bit",      0xAA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR |
+                                                        NAND_BBT_SCAN2NDPAGE},
+       {"NAND 256MiB 3,3V 8-bit",      0xDA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR |
+                                                        NAND_BBT_SCAN2NDPAGE},
+       {"NAND 256MiB 1,8V 16-bit",     0xBA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR |
+                                                        NAND_BBT_SCAN2NDPAGE},
+       {"NAND 256MiB 3,3V 16-bit",     0xCA, 0, 256, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR |
+                                                        NAND_BBT_SCAN2NDPAGE},
 
        /* 4 Gigabit */
        {"NAND 512MiB 1,8V 8-bit",      0xAC, 0, 512, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
-       {"NAND 512MiB 3,3V 8-bit",      0xDC, 0, 512, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},
+       {"NAND 512MiB 3,3V 8-bit",      0xDC, 0, 512, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR |
+                                                        NAND_BBT_SCAN2NDPAGE},
        {"NAND 512MiB 1,8V 16-bit",     0xBC, 0, 512, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
        {"NAND 512MiB 3,3V 16-bit",     0xCC, 0, 512, 0, 
NAND_SAMSUNG_LP_OPTIONS | NAND_BUSWIDTH_16 | NAND_NO_AUTOINCR},
 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to