Commit fd508da2 authored by Barry Song's avatar Barry Song Committed by David Woodhouse

mtd: Blackfin NFC: make sure to check NAND_ALE in cmd_ctrl

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: default avatarBarry Song <barry.song@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 085d45fb
...@@ -203,7 +203,7 @@ static void bf5xx_nand_hwcontrol(struct mtd_info *mtd, int cmd, ...@@ -203,7 +203,7 @@ static void bf5xx_nand_hwcontrol(struct mtd_info *mtd, int cmd,
if (ctrl & NAND_CLE) if (ctrl & NAND_CLE)
bfin_write_NFC_CMD(cmd); bfin_write_NFC_CMD(cmd);
else else if (ctrl & NAND_ALE)
bfin_write_NFC_ADDR(cmd); bfin_write_NFC_ADDR(cmd);
SSYNC(); SSYNC();
} }
......
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