From: Gabor Juhos Date: Fri, 27 Sep 2013 11:15:34 +0000 (+0000) Subject: ar71xx: ar934x-nfc: disable subpage write when hardware ECC is used X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7815af409af011e1a5572fde06450cb42130d461;p=openwrt%2Fstaging%2Frmilecki.git ar71xx: ar934x-nfc: disable subpage write when hardware ECC is used It is not supported by the controller. Signed-off-by: Gabor Juhos SVN-Revision: 38234 --- 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 8b6658087fb..92312515937 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c @@ -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;