u-boot/drivers/mtd/nand
Miquel Raynal c907464a0a mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout
The initial layout for such NAND chips was the following:

+----------------------------------------------------------------------------+
| 1024 (data) | 30 (ECC) | 1024 (data) | 30 (ECC) | 32 (free OOB) | 30 (ECC) |
+----------------------------------------------------------------------------+

This layout has a weakness: reading empty pages trigger ECC errors
(this is expected), but the hardware ECC engine tries to correct the
data anyway and creates itself bitflips, hence bitflips are detected
in erased pages while actually there are none in the NAND chip.

Two solutions have been found at the same time. One was to enlarge the
free OOB area to 64 bytes, changing the layout to be:

+----------------------------------------------------------------------------+
| 1024 (data) | 30 (ECC) | 1024 (data) | 30 (ECC) | 64 (free OOB) | 30 (ECC) |
+----------------------------------------------------------------------------+
                                                    ^^

The very big drawbacks of this solution are:
1/ It prevents booting from NAND.
2/ The current Linux driver (marvell_nand) does not have such problem
because it already re-reads possible empty pages in raw mode before
checking for bitflips. Using different layouts in U-Boot and Linux
would simply not work.

As this driver does support raw reads now and uses it to check for
empty pages, let's forget about this broken hack and return to the
initial layout with only 32 free OOB bytes.

Fixes: ac56a3b30c ("mtd: nand: pxa3xx: add support for 2KB 8-bit flash")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jagan Teki <jagan@openedev.com>
2018-11-22 11:38:13 +05:30
..
raw mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout 2018-11-22 11:38:13 +05:30
spi mtd: nand: spi: Add Gigadevice SPI NAND support 2018-10-04 18:24:24 +05:30
bbt.c mtd: nand: Add core infrastructure to deal with NAND devices 2018-09-20 20:10:49 +05:30
core.c mtd: nand: Add core infrastructure to deal with NAND devices 2018-09-20 20:10:49 +05:30
Kconfig mtd: nand: Add core infrastructure to support SPI NANDs 2018-09-20 20:10:49 +05:30
Makefile mtd: nand: Add core infrastructure to support SPI NANDs 2018-09-20 20:10:49 +05:30