[OpenWrt-Devel] [PATCH] [ar71xx] ar934x-nfc: allow ECC to be configured in software BCH mode
Thomas Hebb
tommyhebb at gmail.com
Fri Jun 12 15:55:45 EDT 2015
Some devices ship with NAND images that use BCH ECC. Let the driver know
about that ECC mode so that it can be selected by machine files.
Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>
---
target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c | 4 ++++
target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
index 9231251..8968129 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
@@ -1437,6 +1437,10 @@ ar934x_nfc_probe(struct platform_device *pdev)
nand->ecc.mode = NAND_ECC_SOFT;
break;
+ case AR934X_NFC_ECC_SOFT_BCH:
+ nand->ecc.mode = NAND_ECC_SOFT_BCH;
+ break;
+
case AR934X_NFC_ECC_HW:
ret = ar934x_nfc_setup_hwecc(nfc);
if (ret)
diff --git
a/target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h
b/target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h
index 4a4e751..371aaee 100644
--- a/target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h
+++ b/target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h
@@ -20,6 +20,7 @@ struct mtd_partition;
enum ar934x_nfc_ecc_mode {
AR934X_NFC_ECC_SOFT = 0,
AR934X_NFC_ECC_HW,
+ AR934X_NFC_ECC_SOFT_BCH,
};
struct ar934x_nfc_platform_data {
--
2.4.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list