diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-06-18 06:37:01 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-06-18 06:37:01 +0000 |
commit | 2c550fbb25c3fa3059b9b0e745e67c75e9fdebbd (patch) | |
tree | c14c68a25362ee87d4bad31ccfad16f9a3a71421 | |
parent | 4bdcf79153f55ffe9fbf8432761a48ba64f876d3 (diff) | |
download | master-187ad058-2c550fbb25c3fa3059b9b0e745e67c75e9fdebbd.tar.gz master-187ad058-2c550fbb25c3fa3059b9b0e745e67c75e9fdebbd.tar.bz2 master-187ad058-2c550fbb25c3fa3059b9b0e745e67c75e9fdebbd.zip |
ar71xx: ar934x-nfc: allow ECC to be configured in software BCH mode
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@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46022 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c | 4 | ||||
-rw-r--r-- | target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h | 1 |
2 files changed, 5 insertions, 0 deletions
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 9231251593..8968129d4f 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 4a4e751d39..371aaee7f8 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 { |