aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/sh_flctl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 407acb51469..61e41c065db 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -303,6 +303,7 @@ static void set_cmd_regs(struct mtd_info *mtd, uint32_t cmd, uint32_t flcmcdr_va
303 break; 303 break;
304 case NAND_CMD_READ0: 304 case NAND_CMD_READ0:
305 case NAND_CMD_READOOB: 305 case NAND_CMD_READOOB:
306 case NAND_CMD_RNDOUT:
306 addr_len_bytes = flctl->rw_ADRCNT; 307 addr_len_bytes = flctl->rw_ADRCNT;
307 flcmdcr_val |= CDSRC_E; 308 flcmdcr_val |= CDSRC_E;
308 if (flctl->chip.options & NAND_BUSWIDTH_16) 309 if (flctl->chip.options & NAND_BUSWIDTH_16)
@@ -558,6 +559,21 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command,
558 flctl->read_bytes = mtd->oobsize; 559 flctl->read_bytes = mtd->oobsize;
559 goto read_normal_exit; 560 goto read_normal_exit;
560 561
562 case NAND_CMD_RNDOUT:
563 if (flctl->hwecc)
564 break;
565
566 if (flctl->page_size)
567 set_cmd_regs(mtd, command, (NAND_CMD_RNDOUTSTART << 8)
568 | command);
569 else
570 set_cmd_regs(mtd, command, command);
571
572 set_addr(mtd, column, 0);
573
574 flctl->read_bytes = mtd->writesize + mtd->oobsize - column;
575 goto read_normal_exit;
576
561 case NAND_CMD_READID: 577 case NAND_CMD_READID:
562 set_cmd_regs(mtd, command, command); 578 set_cmd_regs(mtd, command, command);
563 579