Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298141
b: refs/heads/master
c: 7b6b230
h: refs/heads/master
i:
  298139: d37df01
v: v3
  • Loading branch information
Bastian Hecht authored and David Woodhouse committed Mar 26, 2012
1 parent 99b815a commit 8f8de77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abb59ef3fa7d9b19a193f7f69f9d5746c7dfeec9
refs/heads/master: 7b6b23036b43a418198be9468d4dc4c9ea79c2e8
12 changes: 9 additions & 3 deletions trunk/drivers/mtd/nand/sh_flctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ static void set_cmd_regs(struct mtd_info *mtd, uint32_t cmd, uint32_t flcmcdr_va
break;
case NAND_CMD_READID:
flcmncr_val &= ~SNAND_E;
flcmdcr_val |= CDSRC_E;
addr_len_bytes = ADRCNT_1;
break;
case NAND_CMD_STATUS:
Expand Down Expand Up @@ -559,13 +560,18 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command,

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

flctl->read_bytes = 4;
/* READID is always performed using an 8-bit bus */
if (flctl->chip.options & NAND_BUSWIDTH_16)
column <<= 1;
set_addr(mtd, column, 0);

flctl->read_bytes = 8;
writel(flctl->read_bytes, FLDTCNTR(flctl)); /* set read size */
empty_fifo(flctl);
start_translation(flctl);
read_datareg(flctl, 0); /* read and end */
read_fiforeg(flctl, flctl->read_bytes, 0);
wait_completion(flctl);
break;

case NAND_CMD_ERASE1:
Expand Down

0 comments on commit 8f8de77

Please sign in to comment.