diff options
Diffstat (limited to 'target/linux/ath79/files')
-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 ddc6d6d882..e040726f44 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 @@ -1273,7 +1273,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; @@ -1332,6 +1331,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 LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) if (nand->ecc.engine_type == NAND_ECC_ENGINE_TYPE_ON_HOST) { #else |