summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/drivers/mtd
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-09-17 20:30:51 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-09-17 20:30:51 +0000
commit96dde2e591fd952ba4dc471e55ed88f21c2683d6 (patch)
tree110db7a08020012a5dac782003447bb3c17c6ad9 /target/linux/ar71xx/files/drivers/mtd
parent338b698fb6f8f1fb38b36d10dfe087c7701a2d5e (diff)
downloadmtk-20170518-96dde2e591fd952ba4dc471e55ed88f21c2683d6.zip
mtk-20170518-96dde2e591fd952ba4dc471e55ed88f21c2683d6.tar.gz
mtk-20170518-96dde2e591fd952ba4dc471e55ed88f21c2683d6.tar.bz2
ar71xx: ar934x_nfc: fix RNDOUT operation
SVN-Revision: 33451
Diffstat (limited to 'target/linux/ar71xx/files/drivers/mtd')
-rw-r--r--target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c8
1 files changed, 6 insertions, 2 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 86899fd..d889c70 100644
--- a/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
+++ b/target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
@@ -643,10 +643,14 @@ ar934x_nfc_cmdfunc(struct mtd_info *mtd, unsigned int command, int column,
break;
case NAND_CMD_RNDOUT:
+ if (WARN_ON(nfc->small_page))
+ break;
+
/* emulate subpage read */
- ar934x_nfc_send_read(nfc, nfc->rndout_read_cmd, column,
+ ar934x_nfc_send_read(nfc, nfc->rndout_read_cmd, 0,
nfc->rndout_page_addr,
- mtd->writesize, false);
+ mtd->writesize + mtd->oobsize, false);
+ nfc->buf_index = column;
break;
case NAND_CMD_ERASE1: