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

Marc Kleine-Budde mkl at pengutronix.de
Mon Apr 11 06:08:04 PDT 2016


On 03/15/2016 09:35 AM, Stefan Christ wrote:
> From: Elie De Brauwer <eliedebrauwer at gmail.com>
> 
> 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 (by setting the erase threshold). A
> consequence of this is that whenever an erased page is read, the
> number of bitflips will be 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>
> Acked-by: Huang Shijie <b32955 at freescale.com>

You moght want to coordinate with Markus (Cc'ed) as he tries to solve
the same issue.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20160411/46b1d081/attachment.sig>


More information about the linux-mtd mailing list