ar71xx: ar934x-nfc: disable subpage write when hardware ECC is used
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / files / drivers / mtd / nand / ar934x_nfc.c
index 8b6658087fbddef475909d3d9ba0624808356ebc..923125159376656c5e160fdcd0dcaef5217c7536 100644 (file)
@@ -1281,6 +1281,12 @@ ar934x_nfc_setup_hwecc(struct ar934x_nfc *nfc)
 
        switch (nfc->mtd.writesize) {
        case 2048:
+               /*
+                * Writing a subpage separately is not supported, because
+                * the controller only does ECC on full-page accesses.
+                */
+               nand->options = NAND_NO_SUBPAGE_WRITE;
+
                nand->ecc.size = 512;
                nand->ecc.bytes = 7;
                nand->ecc.strength = 4;