[PATCH 5/7] mtd: Blackfin NFC: make sure to check NAND_ALE in cmd_ctrl

Mike Frysinger vapier at gentoo.org
Thu Aug 5 11:07:42 EDT 2010

From: Barry Song <barry.song at analog.com>

The NAND base may send some controls which are neither CLE nor ALE, so
we need to explicitly check both instead of assuming things are always
one or the other.  Otherwise, we sometimes send out illegal addresses
to the NAND device.

Signed-off-by: Barry Song <barry.song at analog.com>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
 drivers/mtd/nand/bf5xx_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 949f656..2f90cac 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -203,7 +203,7 @@ static void bf5xx_nand_hwcontrol(struct mtd_info *mtd, int cmd,
 	if (ctrl & NAND_CLE)
-	else
+	else if (ctrl & NAND_ALE)

More information about the linux-mtd mailing list