From: Gabor Juhos Date: Mon, 17 Sep 2012 20:30:50 +0000 (+0000) Subject: ar71xx: ar934x_nfc: fix READ{0,1} operation on large page devices X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=ac511bfb6b4149e92d12909e1a6aee18b1b5262e ar71xx: ar934x_nfc: fix READ{0,1} operation on large page devices SVN-Revision: 33450 --- 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 65d9186d47..86899fd720 100644 --- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c @@ -613,15 +613,18 @@ ar934x_nfc_cmdfunc(struct mtd_info *mtd, unsigned int command, int column, case NAND_CMD_READ0: case NAND_CMD_READ1: - if (nfc->small_page) + if (nfc->small_page) { ar934x_nfc_send_read(nfc, command, column, page_addr, mtd->writesize + mtd->oobsize, false); - else - ar934x_nfc_send_read(nfc, command, column, page_addr, - mtd->writesize, false); - nfc->rndout_page_addr = page_addr; - nfc->rndout_read_cmd = command; + } else { + ar934x_nfc_send_read(nfc, command, 0, page_addr, + mtd->writesize + mtd->oobsize, + false); + nfc->buf_index = column; + nfc->rndout_page_addr = page_addr; + nfc->rndout_read_cmd = command; + } break; case NAND_CMD_READOOB: