atmel_nand: don't require CONFIG_SYS_NAND_ENABLE_PIN
authormichael <trimarchi@gandalf.sssup.it>
Mon, 14 Mar 2011 21:16:38 +0000 (21:16 +0000)
committerScott Wood <scottwood@freescale.com>
Fri, 1 Apr 2011 19:49:08 +0000 (14:49 -0500)
If NCE is hooked up to NCS3, we don't need to (and can't)
explicitly set the state of the NCE pin. Instead, the
controller asserts it automatically as part of a
command/data access. Only "CE don't care"-type NAND chips
can be used in this manner.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Reinhard Meyer <u-boot@emk-elektronik.de>
drivers/mtd/nand/atmel_nand.c

index ab8bbb3aea1139639a6c9b11dba57297f44364c0..818d3624a7eb6134c9fba8b5decaaeea1f8edfe9 100644 (file)
@@ -249,8 +249,10 @@ static void at91_nand_hwcontrol(struct mtd_info *mtd,
                if (ctrl & NAND_ALE)
                        IO_ADDR_W |= CONFIG_SYS_NAND_MASK_ALE;
 
+#ifdef CONFIG_SYS_NAND_ENABLE_PIN
                at91_set_gpio_value(CONFIG_SYS_NAND_ENABLE_PIN,
                                    !(ctrl & NAND_NCE));
+#endif
                this->IO_ADDR_W = (void *) IO_ADDR_W;
        }