u-boot-brain/drivers/mtd/nand
Darwin Dingel 1711add3dc mtd: nand: fsl_ifc: Fix handling of bitflips in erased pages
This is a fix made for the fsl_ifc_nand driver on linux kernel by
Pavel Machek and is applied to uboot. It is currently on applied on
linux-mtd.

https://patchwork.kernel.org/patch/9758117/

IFC always raises ECC errors on erased pages. It is only ignored when
the buffer is checked for all 0xFF by is_blank(). The problem is a
single bitflip will cause is_blank() and then mtd_read to fail. The fix
makes use of nand_check_erased_ecc_chunk() to check for empty pages
instead of is_blank(). This also makes sure that reads are made at ECC
page size granularity to get a proper bitflip count. If the number of
bitflips does not exceed the ECC strength, the page is considered empty
and the bitflips will be corrected when data is sent to the higher
layers (e.g. ubi).

Signed-off-by: Darwin Dingel <darwin.dingel@alliedtelesis.co.nz>
Cc: Pavel Machek <pavel@denx.de>
Cc: Scott Wood <oss@buserror.net>
Acked-by: Pavel Machek <pavel@denx.de>
[Kurt: Replaced dev_err by printf due to compiler warnings]
Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: York Sun <york.sun@nxp.com>
2018-08-10 10:35:51 -07:00
..
am335x_spl_bch.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
arasan_nfc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmel_nand_ecc.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
atmel_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
davinci_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
denali_dt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
denali_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
denali.c mtd: nand: denali: correct buffer alignment for DMA transfer 2018-07-25 08:47:52 +09:00
denali.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_elbc_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_elbc_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_ifc_nand.c mtd: nand: fsl_ifc: Fix handling of bitflips in erased pages 2018-08-10 10:35:51 -07:00
fsl_ifc_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_upm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsmc_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
kb9202_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Kconfig Convert CONFIG_NAND_DAVINCI to Kconfig 2018-07-21 22:26:56 -04:00
kirkwood_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
kmeter1_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpc32xx_nand_mlc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lpc32xx_nand_slc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile spl, nand: add option CONFIG_SPL_NAND_IDENT to lookup for supported NAND chips 2018-06-27 12:20:55 +02:00
mxc_nand_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxc_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxc_nand.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxs_nand_dt.c mtd: nand: mxs_nand: add device tree support for i.MX 6 2018-07-23 10:12:00 +02:00
mxs_nand_spl.c mtd: nand: mxs_nand_spl: add mxs_flash_full_ident 2018-06-27 12:20:55 +02:00
mxs_nand.c mtd: nand: mxs_nand: add support for specific ECC strength 2018-06-27 09:07:55 +02:00
mxs_nand.h mtd: nand: mxs_nand: move structs into header file 2018-06-27 09:07:55 +02:00
nand_base.c mtd: nand: nand_base: Convert EINVAL into ENOTSUPP 2018-07-31 20:45:42 +05:30
nand_bbt.c mtd: nand: Rename nand.h into rawnand.h 2017-12-04 22:00:00 +09:00
nand_bch.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nand_ecc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nand_ids.c mtd: nand: Rename nand.h into rawnand.h 2017-12-04 22:00:00 +09:00
nand_plat.c mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data 2016-06-03 20:27:48 -05:00
nand_spl_load.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nand_spl_loaders.c mtd: nand: Consolidate nand spl loaders implementation 2017-05-08 11:57:26 -04:00
nand_spl_simple.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nand_timings.c mtd: nand: Rename nand.h into rawnand.h 2017-12-04 22:00:00 +09:00
nand_util.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omap_elm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omap_gpmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pxa3xx_nand.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pxa3xx_nand.h mtd: nand: Add mvebu (PXA / AXP / A38x) NAND device driver 2015-08-25 22:53:58 -05:00
sunxi_nand_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sunxi_nand.c mtd: nand: sunxi: Return on set_feature only when not ENOTSUPP 2018-07-31 20:45:50 +05:30
tegra_nand.c mtd: nand: tegra: convert to driver model and live tree 2018-05-10 16:34:10 -07:00
tegra_nand.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
vf610_nfc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynq_nand.c nand: zynq: Send address cycles as per onfi parameter page 2018-05-11 09:23:43 +02:00