Commit 2314488e authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by David Woodhouse

[MTD] [NAND] at91_nand: control NCE signal

This driver did not control NCE signal during normal operations (only
enable NCE on probing and disable NCE on removing).  This patch make
NCE signal inactive on idle state.
Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent d43fa149
...@@ -101,6 +101,12 @@ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) ...@@ -101,6 +101,12 @@ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
struct nand_chip *nand_chip = mtd->priv; struct nand_chip *nand_chip = mtd->priv;
struct at91_nand_host *host = nand_chip->priv; struct at91_nand_host *host = nand_chip->priv;
if (host->board->enable_pin && (ctrl & NAND_CTRL_CHANGE)) {
if (ctrl & NAND_NCE)
at91_set_gpio_value(host->board->enable_pin, 0);
else
at91_set_gpio_value(host->board->enable_pin, 1);
}
if (cmd == NAND_CMD_NONE) if (cmd == NAND_CMD_NONE)
return; return;
......
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