u-boot-brain/drivers/mtd
Anton Vorontsov 97ae023648 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>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-09-12 14:56:03 -05:00
..
nand fsl_elbc_nand: fix OOB workability for large page NAND chips 2008-09-12 14:56:03 -05:00
nand_legacy drivers/mtd/nand_legacy: Move conditional compilation to Makefile 2008-08-13 01:40:43 +02:00
onenand Minor coding style cleanup, updte CHANGELOG 2008-08-25 23:45:41 +02:00
spi mtd: SPI Flash: Support the STMicro Flash 2008-09-09 11:57:29 -06:00
at45.c drivers/mtd: Move conditional compilation to Makefile 2008-08-13 01:40:42 +02:00
cfi_flash.c Fix printf errors under -DDEBUG 2008-09-09 17:02:41 -05:00
dataflash.c DataFlash: AT45DB021 fix and AT45DB081 support 2008-08-09 00:15:06 +02:00
jedec_flash.c cfi-flash: Add definition for the AM29LV800BB AMD NOR-flash 2008-08-06 14:19:06 +02:00
Makefile drivers/mtd: Move conditional compilation to Makefile 2008-08-13 01:40:42 +02:00
mw_eeprom.c Update i386 code (sc520_cdp) 2008-09-09 11:48:53 +02:00