When using 2kiB-pages NAND chips requesting an 8-bit strength ECC, the layout used is a bit particular and it happens that the ECC engine tries to correct uncorrectable errors on empty pages, producing bitflips.
To avoid such situation, raw read support is added to the pxa3xx_nand driver, and then used to re-read the page (in raw mode) upon uncorrectable error detection to know if there is an actual ECC mismatch or if the page is empty. This way we avoid seeing the bitflips created by the hardware ECC engine. Once this done, we can revert the hack that was done in the driver to enlarge the last spare area for this layout to 64B instead of 32B, breaking U-Boot/Linux compatibility and preventing the BootROM to boot from NAND. Thanks, Miquèl Miquel Raynal (3): mtd: nand: pxa3xx: add raw read support mtd: nand: pxa3xx: re-read a page in raw mode on uncorrectable error mtd: rawnand: pxa3xx: fix 2kiB pages with 8b strength chips layout drivers/mtd/nand/raw/pxa3xx_nand.c | 143 +++++++++++++++++++++++++---- 1 file changed, 124 insertions(+), 19 deletions(-) -- 2.17.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot