summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2017-12-18 13:32:45 +0300
committerRichard Weinberger <richard@nod.at>2018-01-07 01:06:58 +0300
commitfee4380f368e84ed216b62ccd2fbc4126f2bf40b (patch)
treeebb044eea35a90700f99f98fde692bbaacd1c0e9 /arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
parent30a7acd573899fd8b8ac39236eff6468b195ac7d (diff)
downloadlinux-fee4380f368e84ed216b62ccd2fbc4126f2bf40b.tar.xz
mtd: nand: pxa3xx: Fix READOOB implementation
In the current driver, OOB bytes are accessed in raw mode, and when a page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the driver must read the whole spare area (64 bytes in case of a 2k page, 16 bytes for a 512 page). The driver was only reading the free OOB bytes, which was leaving some unread data in the FIFO and was somehow leading to a timeout. We could patch the driver to read ->spare_size + ->ecc_size instead of just ->spare_size when READOOB is requested, but we'd better make in-band and OOB accesses consistent. Since the driver is always accessing in-band data in non-raw mode (with the ECC engine enabled), we should also access OOB data in this mode. That's particularly useful when using the BCH engine because in this mode the free OOB bytes are also ECC protected. Fixes: 43bcfd2bb24a ("mtd: nand: pxa3xx: Add driver-specific ECC BCH support") Cc: stable@vger.kernel.org Reported-by: Sean Nyekjær <sean.nyekjaer@prevas.dk> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts')
0 files changed, 0 insertions, 0 deletions