aboutsummaryrefslogtreecommitdiffstats
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
commitb31a6ffbb7b58923857d2d6497d51b5d9f813067 (patch)
treed7c01db2520fcf65ffeeb56d954cd8115a5e00fb
parent139ed17d115a15835136d05760e0c6f5be99c751 (diff)
downloadupstream-b31a6ffbb7b58923857d2d6497d51b5d9f813067.tar.gz
upstream-b31a6ffbb7b58923857d2d6497d51b5d9f813067.tar.bz2
upstream-b31a6ffbb7b58923857d2d6497d51b5d9f813067.zip
ar71xx: ar934x_nfc: fix READ{0,1} operation on large page devices
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33450 3c298f89-4303-0410-b956-a3cf2f4a3e73
-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 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: