Commit 12efdde3 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by David Woodhouse

[MTD] NAND fix cmd_ctrl breakage

The cmd_ctrl rework lacks some state transition flags.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent ace4dfee
...@@ -538,7 +538,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command, ...@@ -538,7 +538,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
udelay(chip->chip_delay); udelay(chip->chip_delay);
chip->cmd_ctrl(mtd, NAND_CMD_STATUS, chip->cmd_ctrl(mtd, NAND_CMD_STATUS,
NAND_CTRL_CLE | NAND_CTRL_CHANGE); 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)) ; while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ;
return; return;
...@@ -641,14 +642,18 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command, ...@@ -641,14 +642,18 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
if (chip->dev_ready) if (chip->dev_ready)
break; break;
udelay(chip->chip_delay); udelay(chip->chip_delay);
chip->cmd_ctrl(mtd, NAND_CMD_STATUS, NAND_NCE | NAND_CLE); chip->cmd_ctrl(mtd, NAND_CMD_STATUS,
chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE); 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)) ; while (!(chip->read_byte(mtd) & NAND_STATUS_READY)) ;
return; return;
case NAND_CMD_READ0: case NAND_CMD_READ0:
chip->cmd_ctrl(mtd, NAND_CMD_READSTART, NAND_NCE | NAND_CLE); chip->cmd_ctrl(mtd, NAND_CMD_READSTART,
chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE); NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
chip->cmd_ctrl(mtd, NAND_CMD_NONE,
NAND_NCE | NAND_CTRL_CHANGE);
/* This applies to read commands */ /* This applies to read commands */
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment