u-boot-brain/drivers/mtd/nand/raw
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
..
am335x_spl_bch.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
arasan_nfc.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
atmel_nand_ecc.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
atmel_nand.c nand: atmel: Initialize pmecc smu with correct size 2018-10-22 09:18:49 -04:00
davinci_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
denali_dt.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
denali_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
denali.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
denali.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsl_elbc_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsl_elbc_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsl_ifc_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsl_ifc_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsl_upm.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
fsmc_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
kb9202_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
Kconfig mtd: rename nand into rawnand in Kconfig prompt 2018-09-20 20:10:49 +05:30
kirkwood_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
kmeter1_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
lpc32xx_nand_mlc.c mtd: nand: lpc32xx mlc: predefine number of NAND chips to support 2018-11-16 13:34:36 -05:00
lpc32xx_nand_slc.c mtd: nand: lpc32xx slc: disable DMA support in SPL builds 2018-11-16 13:34:37 -05:00
Makefile mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxc_nand_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxc_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxc_nand.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxs_nand_dt.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxs_nand_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxs_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
mxs_nand.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_base.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_bbt.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_bch.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_ecc.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_ids.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_plat.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_spl_load.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_spl_loaders.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_spl_simple.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_timings.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand_util.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
omap_elm.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
omap_gpmc.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
pxa3xx_nand.c mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout 2018-11-22 11:38:13 +05:30
pxa3xx_nand.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
sunxi_nand_spl.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
sunxi_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
tegra_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
tegra_nand.h mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
vf610_nfc.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30
zynq_nand.c mtd: move NAND files into a raw/ subdirectory 2018-09-20 20:10:49 +05:30