[MTD] [NAND] fsl_elbc_nand: Fix SEQIN handling for large pages.

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Apr 22 11:59:01 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=576506645df01f3c1a9c2c9064201aa0ba4cb0ea
Commit:     576506645df01f3c1a9c2c9064201aa0ba4cb0ea
Parent:     f72561cf6c9d0671da57902bc2ffee03b074227a
Author:     Scott Wood <scottwood at freescale.com>
AuthorDate: Fri Apr 4 17:06:05 2008 -0500
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Apr 22 15:36:24 2008 +0100

    [MTD] [NAND] fsl_elbc_nand: Fix SEQIN handling for large pages.
    
    Previously, a READ command was erroneously issued rather than SEQIN.
    
    Signed-off-by: Scott Wood <scottwood at freescale.com>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/fsl_elbc_nand.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 378b7aa..b9f9f22 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -346,19 +346,20 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
 		ctrl->column = column;
 		ctrl->oob = 0;
 
-		fcr = (NAND_CMD_PAGEPROG << FCR_CMD1_SHIFT) |
-		      (NAND_CMD_SEQIN << FCR_CMD2_SHIFT);
-
 		if (priv->page_size) {
+			fcr = (NAND_CMD_SEQIN << FCR_CMD0_SHIFT) |
+			      (NAND_CMD_PAGEPROG << FCR_CMD1_SHIFT);
+
 			out_be32(&lbc->fir,
 			         (FIR_OP_CW0 << FIR_OP0_SHIFT) |
 			         (FIR_OP_CA  << FIR_OP1_SHIFT) |
 			         (FIR_OP_PA  << FIR_OP2_SHIFT) |
 			         (FIR_OP_WB  << FIR_OP3_SHIFT) |
 			         (FIR_OP_CW1 << FIR_OP4_SHIFT));
-
-			fcr |= NAND_CMD_READ0 << FCR_CMD0_SHIFT;
 		} else {
+			fcr = (NAND_CMD_PAGEPROG << FCR_CMD1_SHIFT) |
+			      (NAND_CMD_SEQIN << FCR_CMD2_SHIFT);
+
 			out_be32(&lbc->fir,
 			         (FIR_OP_CW0 << FIR_OP0_SHIFT) |
 			         (FIR_OP_CM2 << FIR_OP1_SHIFT) |



More information about the linux-mtd-cvs mailing list