ar71xx: ar934x-nfc: allow ECC to be configured in software BCH mode
authorFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jun 2015 06:37:01 +0000 (06:37 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jun 2015 06:37:01 +0000 (06:37 +0000)
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>
SVN-Revision: 46022

target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
target/linux/ar71xx/files/include/linux/platform/ar934x_nfc.h

index 923125159376656c5e160fdcd0dcaef5217c7536..8968129d4f9cca73e5506d05ba955b5022db7f65 100644 (file)
@@ -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)
index 4a4e751d39f00166984ea86402fdacf06a6f7f18..371aaee7f8268f8f7c7bf621429f5c6216a34947 100644 (file)
@@ -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 {