diff options
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c index 5f0026b475..7ba7b68d57 100644 --- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c +++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c @@ -1266,7 +1266,6 @@ static int ar934x_nfc_setup_hwecc(struct ar934x_nfc *nfc) * 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; @@ -1325,6 +1324,9 @@ static int ar934x_nfc_attach_chip(struct nand_chip *nand) if (ret) return ret; + if (mtd->writesize == 2048) + nand->options |= NAND_NO_SUBPAGE_WRITE; + if (nand->ecc.mode == NAND_ECC_HW) { ret = ar934x_nfc_setup_hwecc(nfc); if (ret) |