linux/drivers/mtd/nand
Anton Vorontsov 452db27243 [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips
For large page chips, nand_bbt is looking into OOB area, and checking
for "0xff 0xff" pattern at OOB offset 0. That is, two bytes should be
reserved for bbt means.

But ELBC driver is specifying ecclayout so that oobfree area starts at
offset 1, so only one byte left for the bbt purposes.

This causes problems with any OOB users, namely JFFS2: after first mount
JFFS2 will fill all OOBs with "erased marker", so OOBs will contain:

  OOB Data: ff 19 85 20 03 00 ff ff ff 00 00 08 ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

And on the next boot, NAND core will rescan for bad blocks, then will
see "0xff 0x19" pattern, and will mark all blocks as bad ones.

To fix the issue we should implement our own bad block pattern: just one
byte at OOB start. Though, this will work only for x8 chips. For x16
chips two bytes must be checked. Since ELBC driver does not support x16
NANDs (yet), we're safe for now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-11 18:12:01 +01:00
..
Kconfig [MTD] [NAND] atmel_nand can be modular 2008-07-11 14:52:54 +01:00
Makefile [MTD] [NAND] rename at91_nand -> atmel_nand: file names and Kconfig 2008-06-07 08:42:51 +01:00
alauda.c
ams-delta.c
atmel_nand.c [MTD] [NAND] atmel_nand: Work around AT32AP7000 ECC erratum 2008-07-11 14:52:02 +01:00
atmel_nand_ecc.h [MTD] [NAND] rename at91_nand -> atmel_nand: internal symbols 2008-06-07 08:43:00 +01:00
au1550nd.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
autcpu12.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
bf5xx_nand.c [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed. 2008-04-25 09:10:55 +01:00
cafe_nand.c [MTD] [NAND] fix 2 "unused variable" warnings in cafe_nand.c 2008-06-04 17:27:20 +01:00
cmx270_nand.c
cs553x_nand.c [MTD] [NAND] mtd/nand/cs553x_nand.c:part_probes[] static 2008-04-22 12:35:40 +01:00
diskonchip.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
edb7312.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
excite_nandflash.c [MTD] [NAND] excite_nandflash: simplify code using ARRAY_SIZE() macro. 2008-06-04 17:28:03 +01:00
fsl_elbc_nand.c [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips 2008-07-11 18:12:01 +01:00
fsl_upm.c [MTD] [NAND] FSL UPM NAND driver 2008-04-22 20:46:30 +01:00
h1910.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
nand_base.c [MTD] [NAND] Verify probe by retrying to checking the results match 2008-04-22 21:43:06 +01:00
nand_bbt.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
nand_ecc.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
nand_ids.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
nandsim.c [MTD] [NAND] nandsim: missing header for do_div 2008-06-05 19:45:19 +01:00
ndfc.c [MTD] [NAND] fix platform driver hotplug/coldplug 2008-04-22 14:17:47 +01:00
orion_nand.c [MTD] [NAND] fix platform driver hotplug/coldplug 2008-04-22 14:17:47 +01:00
pasemi_nand.c [MTD] [NAND] pasemi_nand driver 2007-11-29 00:47:13 +00:00
plat_nand.c [MTD] [NAND] plat_nand: set mtd->name 2008-04-22 21:11:54 +01:00
ppchameleonevb.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
pxa3xx_nand.c [MTD] [NAND] pxa: fix incorrect calling of pxa3xx_nand_config() on resume path 2008-06-04 17:37:25 +01:00
rtc_from4.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
s3c2410.c [MTD] [NAND] S3C2410: Remove changelog and tidy header 2008-06-04 18:02:56 +01:00
sharpsl.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
spia.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
toto.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
ts7250.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00