Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207745
b: refs/heads/master
c: 6c49939
h: refs/heads/master
i:
  207743: 2d510f4
v: v3
  • Loading branch information
Sascha Hauer authored and David Woodhouse committed Aug 2, 2010
1 parent 232c7d9 commit d60201f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 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: a4b81ca50974051195b11ca173da073b961f94d5
refs/heads/master: 6c49939869c20550512386610ece45aceb65e7f4
31 changes: 5 additions & 26 deletions trunk/drivers/mtd/nand/mxc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
else
host->buf_start = column + mtd->writesize;

if (mtd->writesize > 512)
command = NAND_CMD_READ0; /* only READ0 is valid */
command = NAND_CMD_READ0; /* only READ0 is valid */

send_cmd(host, command, false);
mxc_do_addr_cycle(mtd, column, page_addr);
Expand All @@ -639,31 +638,11 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
break;

case NAND_CMD_SEQIN:
if (column >= mtd->writesize) {
/*
* FIXME: before send SEQIN command for write OOB,
* We must read one page out.
* For K9F1GXX has no READ1 command to set current HW
* pointer to spare area, we must write the whole page
* including OOB together.
*/
if (mtd->writesize > 512)
/* call ourself to read a page */
mxc_nand_command(mtd, NAND_CMD_READ0, 0,
page_addr);

host->buf_start = column;

/* Set program pointer to spare region */
if (mtd->writesize == 512)
send_cmd(host, NAND_CMD_READOOB, false);
} else {
host->buf_start = column;
if (column >= mtd->writesize)
/* call ourself to read a page */
mxc_nand_command(mtd, NAND_CMD_READ0, 0, page_addr);

/* Set program pointer to page start */
if (mtd->writesize == 512)
send_cmd(host, NAND_CMD_READ0, false);
}
host->buf_start = column;

send_cmd(host, command, false);
mxc_do_addr_cycle(mtd, column, page_addr);
Expand Down

0 comments on commit d60201f

Please sign in to comment.