OSDN Git Service

mtd: rawnand: brcmnand: ECC error handling on EDU transfers
authorKamal Dasu <kdasu.kdev@gmail.com>
Fri, 12 Jun 2020 21:29:02 +0000 (17:29 -0400)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 26 Jun 2020 06:35:10 +0000 (08:35 +0200)
commit4551e78ad98add1f16b70cf286d5aad3ce7bcd4c
tree642d8b379f7f1ce9d3076e0a7b197db848f984d5
parentbee3ab8bdd3b13faf08e5b6e0218f59b0a49fcc3
mtd: rawnand: brcmnand: ECC error handling on EDU transfers

Implement ECC correctable and uncorrectable error handling for EDU
reads. If ECC correctable bitflips are encountered on EDU transfer,
read page again using PIO. This is needed due to a NAND controller
limitation where corrected data is not transferred to the DMA buffer
on ECC error. This applies to ECC correctable errors that are reported
by the controller hardware based on set number of bitflips threshold in
the controller threshold register, bitflips below the threshold are
corrected silently and are not reported by the controller hardware.

Fixes: a5d53ad26a8b ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers")
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200612212902.21347-3-kdasu.kdev@gmail.com
drivers/mtd/nand/raw/brcmnand/brcmnand.c