[PATCH v6] mtd: gpmi: Deal with bitflips in erased regions regions

Huang Shijie b32955 at freescale.com
Thu Dec 19 00:10:53 EST 2013


On Wed, Dec 18, 2013 at 08:07:12PM +0100, Elie De Brauwer wrote:
> The BCH block typically used with a GPMI block on an i.MX28/i.MX6 is only
> able to correct bitflips on data actually streamed through the block.
> When erasing a block the data does not stream through the BCH block
> and therefore no ECC data is written to the NAND chip. This causes
> gpmi_ecc_read_page to return failure as soon as a single non-1-bit is
> found in an erased page. Typically causing problems at higher levels
> (ubifs corrupted empty space warnings). This problem was also observed
> when using SLC NAND devices.
> 
> This patch configures the BCH block to mark a block as 'erased' if
> not too much bitflips are found. Next HW_BCH_STATUS0:ALLONES
> is used to check if the data read were all ones, indicating a read of a
> properly erased chunk was performed. If this was not the case a slow path
> is entered where bitflips are counted and corrected in software,
> allowing the upper layers to take proper actions.
> 
> Signed-off-by: Elie De Brauwer <eliedebrauwer at gmail.com>
> Acked-by: Peter Korsgaard <peter at korsgaard.com>

thanks a lot!

Acked-by: Huang Shijie <b32955 at freescale.com>




More information about the linux-mtd mailing list