summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/at91_nand.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-04-24 16:51:29 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2008-04-25 10:08:05 +0200
commit2314488e81b6f8966d3ea607c4517a64bf58f283 (patch)
tree693e4808929113c1268138d9f80acad2b15252f3 /drivers/mtd/nand/at91_nand.c
parent[MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260 (diff)
downloadlinux-2314488e81b6f8966d3ea607c4517a64bf58f283.tar.xz
linux-2314488e81b6f8966d3ea607c4517a64bf58f283.zip
[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: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand/at91_nand.c')
-rw-r--r--drivers/mtd/nand/at91_nand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
index 09ebcc93ed3b..414ceaecdb3a 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/at91_nand.c
@@ -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 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)
return;