Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282836
b: refs/heads/master
c: a9a552f
h: refs/heads/master
v: v3
  • Loading branch information
Liu Shuo authored and David Woodhouse committed Jan 9, 2012
1 parent 19dbee4 commit 234a6bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 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: b604436cb06626363f0da357759797a5e1894baf
refs/heads/master: a9a552f0bf6258c3593e8887c7212f0fbec8b44c
18 changes: 11 additions & 7 deletions trunk/drivers/mtd/nand/fsl_elbc_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,17 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
page_addr, column);

elbc_fcm_ctrl->column = column;
elbc_fcm_ctrl->oob = 0;
elbc_fcm_ctrl->use_mdr = 1;

if (column >= mtd->writesize) {
/* OOB area */
column -= mtd->writesize;
elbc_fcm_ctrl->oob = 1;
} else {
WARN_ON(column != 0);
elbc_fcm_ctrl->oob = 0;
}

fcr = (NAND_CMD_STATUS << FCR_CMD1_SHIFT) |
(NAND_CMD_SEQIN << FCR_CMD2_SHIFT) |
(NAND_CMD_PAGEPROG << FCR_CMD3_SHIFT);
Expand All @@ -434,16 +442,12 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
(FIR_OP_CW1 << FIR_OP6_SHIFT) |
(FIR_OP_RS << FIR_OP7_SHIFT));

if (column >= mtd->writesize) {
if (elbc_fcm_ctrl->oob)
/* OOB area --> READOOB */
column -= mtd->writesize;
fcr |= NAND_CMD_READOOB << FCR_CMD0_SHIFT;
elbc_fcm_ctrl->oob = 1;
} else {
WARN_ON(column != 0);
else
/* First 256 bytes --> READ0 */
fcr |= NAND_CMD_READ0 << FCR_CMD0_SHIFT;
}
}

out_be32(&lbc->fcr, fcr);
Expand Down

0 comments on commit 234a6bb

Please sign in to comment.