]> asedeno.scripts.mit.edu Git - linux.git/commit
mtd: rawnand: marvell: support 8b/512B strength for 2kiB pages layout
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 19 Jul 2018 10:21:19 +0000 (12:21 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 3 Oct 2018 09:12:25 +0000 (11:12 +0200)
commit7fd130f7416f1c67c2b976d42c1b64371c3a7bd2
treeefd24805dfc987d2d283609a27a651e85d59d6ce
parentdbfc671856b349d702d94ccb96d38569991122cf
mtd: rawnand: marvell: support 8b/512B strength for 2kiB pages layout

Add support for the layout used by 2kiB page NAND chips requesting at
least 8-bit of correction per 512 bytes. This layout requires a bit of
handling as:
1/ It can only fit if the NAND chip has at least 128 OOB bytes.
2/ The Bad Block Markers are located in the middle of the data bytes
   and shall not be used.
3/ It has been experimentally observed that, for certain layouts, the ECC
   engine tries to correct data while it should not because the errors
   are uncorrectable. While this is harmless for truly bad pages, it
   creates bitflips in empty pages. To avoid such scenario that
   augments artificially the number of bitflips we re-read in raw mode
   the entire page instead of just the ECC bytes. This is done only
   for this layout to avoid an unneeded penalty with other setups.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/marvell_nand.c