summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/drivers/mtd
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-09-17 20:30:50 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-09-17 20:30:50 +0000
commit338b698fb6f8f1fb38b36d10dfe087c7701a2d5e (patch)
tree7370a2c74ca49ece909c8d1378b50e398dce6bdb /target/linux/ar71xx/files/drivers/mtd
parent2165240c3237a4a42e8687ab9b3d04e8f1e1bff5 (diff)
downloadmtk-20170518-338b698fb6f8f1fb38b36d10dfe087c7701a2d5e.zip
mtk-20170518-338b698fb6f8f1fb38b36d10dfe087c7701a2d5e.tar.gz
mtk-20170518-338b698fb6f8f1fb38b36d10dfe087c7701a2d5e.tar.bz2
ar71xx: ar934x_nfc: fix READ{0,1} operation on large page devices
SVN-Revision: 33450
Diffstat (limited to 'target/linux/ar71xx/files/drivers/mtd')
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c15
1 files changed, 9 insertions, 6 deletions
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 65d9186..86899fd 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: