mtd: rawnand: micron: Make ECC activation stateful
authorBoris Brezillon <boris.brezillon@bootlin.com>
Wed, 18 Jul 2018 08:42:21 +0000 (10:42 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 19 Jul 2018 21:15:05 +0000 (23:15 +0200)
commit317c6d9b69eb2dcab2ca4759a2c1c04496ec1591
tree3204f6dc9a6599f2652bc9138c2fd67a7f988654
parentef422e1ecd272d077efce64432907632758cf2e2
mtd: rawnand: micron: Make ECC activation stateful

We currently don't store the on-die ECC state (enabled/disabled) which
might force us to re-disable the engine even if it's already been
disabled after we've read the page in raw mode to count the actual
number of bitflips.

Add an "enabled" field to struct micron_on_die_ecc to keep track of the
ECC state.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/nand_micron.c