summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDarwin Dingel <darwin.dingel@alliedtelesis.co.nz>2018-08-02 10:02:45 +0200
committerYork Sun <york.sun@nxp.com>2018-08-10 10:35:51 -0700
commit1711add3dca291376072ec0c66b01023a3462daf (patch)
tree27c00385dec33370a5ff031aa048a03e847b36d3 /arch
parent5651f438f8ac566eb5fec7c1fe92a0282d459e60 (diff)
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>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions