]> err.no Git - linux-2.6/commitdiff
[MTD] NAND fix cmd_ctrl breakage
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>
Wed, 24 May 2006 20:57:09 +0000 (22:57 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 24 May 2006 22:45:24 +0000 (23:45 +0100)
The cmd_ctrl rework lacks some state transition flags.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/mtd/nand/nand_base.c

index 6036d322bf68cf22440be8b4a8496bc98ed90621..5690de223c114b8478a4c0b8ff1044ac7823bef8 100644 (file)
@@ -538,7 +538,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
                udelay(chip->chip_delay);
                chip->cmd_ctrl(mtd, NAND_CMD_STATUS,
                               NAND_CTRL_CLE | NAND_CTRL_CHANGE);
-               chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE);
+               chip->cmd_ctrl(mtd,
+                              NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE);
                while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ;
                return;
 
@@ -641,14 +642,18 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
                if (chip->dev_ready)
                        break;
                udelay(chip->chip_delay);
-               chip->cmd_ctrl(mtd, NAND_CMD_STATUS, NAND_NCE | NAND_CLE);
-               chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE);
+               chip->cmd_ctrl(mtd, NAND_CMD_STATUS,
+                              NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
+               chip->cmd_ctrl(mtd, NAND_CMD_NONE,
+                              NAND_NCE | NAND_CTRL_CHANGE);
                while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ;
                return;
 
        case NAND_CMD_READ0:
-               chip->cmd_ctrl(mtd, NAND_CMD_READSTART, NAND_NCE | NAND_CLE);
-               chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE);
+               chip->cmd_ctrl(mtd, NAND_CMD_READSTART,
+                              NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
+               chip->cmd_ctrl(mtd, NAND_CMD_NONE,
+                              NAND_NCE | NAND_CTRL_CHANGE);
 
                /* This applies to read commands */
        default: