Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298142
b: refs/heads/master
c: dd5ab24
h: refs/heads/master
v: v3
  • Loading branch information
Bastian Hecht authored and David Woodhouse committed Mar 26, 2012
1 parent 8f8de77 commit 77a088f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b6b23036b43a418198be9468d4dc4c9ea79c2e8
refs/heads/master: dd5ab248329edab4b16b70e4d9920f162d181d90
16 changes: 16 additions & 0 deletions trunk/drivers/mtd/nand/sh_flctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static void set_cmd_regs(struct mtd_info *mtd, uint32_t cmd, uint32_t flcmcdr_va
break;
case NAND_CMD_READ0:
case NAND_CMD_READOOB:
case NAND_CMD_RNDOUT:
addr_len_bytes = flctl->rw_ADRCNT;
flcmdcr_val |= CDSRC_E;
if (flctl->chip.options & NAND_BUSWIDTH_16)
Expand Down Expand Up @@ -558,6 +559,21 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command,
flctl->read_bytes = mtd->oobsize;
goto read_normal_exit;

case NAND_CMD_RNDOUT:
if (flctl->hwecc)
break;

if (flctl->page_size)
set_cmd_regs(mtd, command, (NAND_CMD_RNDOUTSTART << 8)
| command);
else
set_cmd_regs(mtd, command, command);

set_addr(mtd, column, 0);

flctl->read_bytes = mtd->writesize + mtd->oobsize - column;
goto read_normal_exit;

case NAND_CMD_READID:
set_cmd_regs(mtd, command, command);

Expand Down

0 comments on commit 77a088f

Please sign in to comment.