mtd: gpmi: Add erased page bitflip correction
Hardware ECC does not work for erased pages. However as soon as
something that is not 0xff is found in the page, hardware ECC assumes
this is valid data and produces an uncorrectable error ECC status. We
can use that to check for bitflips in erased pages and fix them if the
number of flipped bits is below the ecc_strength.

We need to move the memcpy above the for loop to be able to access the
buffer directly.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 142963e commit 69528e8b79aa67e1eb946689fac970ab3aee53a4
@Markus Pargmann Markus Pargmann authored on 21 Dec 2015
Sascha Hauer committed on 4 Jan 2016
Showing 1 changed file
View
drivers/mtd/nand/nand_mxs.c