summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-08-26 14:35:01 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-28 12:06:00 +0200
commitb3f6d0f4dcbb46eaadf0e1c47d97b5c5d25fd0b4 (patch)
tree2ec1c4c31b13eb3d2afe8bca75f25694511fe86c /arch/arm/mach-omap
parent8230e408d200a46f83131120f0a190727e890078 (diff)
downloadbarebox-b3f6d0f4dcbb46eaadf0e1c47d97b5c5d25fd0b4.tar.gz
barebox-b3f6d0f4dcbb46eaadf0e1c47d97b5c5d25fd0b4.tar.xz
mtd: nand: gpmc: Add BCH16 support
This adds support for BCH16 ECC encoding. The support is mostly taken from Linux-5.3-rc6. One major change is the different wrap mode used. The Kernel uses wrapmode 1, which means "pass all data through the BCH engine". Still the Kernel has to skip the OOB marker which is done by reading all user data, then use NAND_CMD_RNDOUT to position right behind the OOB marker and then read the ECC data. Instead of doing this we use wrap mode 4 which allows us to bypass the OOB marker from the BCH engine automatically. This explains bch_wrapmode = 1, eccsize0 = 0, eccsize1 = 52 vs. bch_wrapmode = 4, eccsize0 = 4, eccsize1 = 52 Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap')
-rw-r--r--arch/arm/mach-omap/include/mach/gpmc_nand.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/include/mach/gpmc_nand.h b/arch/arm/mach-omap/include/mach/gpmc_nand.h
index c9730a9454..f172b576eb 100644
--- a/arch/arm/mach-omap/include/mach/gpmc_nand.h
+++ b/arch/arm/mach-omap/include/mach/gpmc_nand.h
@@ -34,6 +34,7 @@ enum gpmc_ecc_mode {
OMAP_ECC_HAMMING_CODE_HW_ROMCODE,
OMAP_ECC_BCH8_CODE_HW,
OMAP_ECC_BCH8_CODE_HW_ROMCODE,
+ OMAP_ECC_BCH16_CODE_HW,
};
/** omap nand platform data structure */