Skip to content

Commit

Permalink
mtd: Blackfin NFC: make sure to check NAND_ALE in cmd_ctrl
Browse files Browse the repository at this point in the history
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@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Barry Song authored and David Woodhouse committed Aug 5, 2010
1 parent 085d45f commit fd508da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/bf5xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static void bf5xx_nand_hwcontrol(struct mtd_info *mtd, int cmd,

if (ctrl & NAND_CLE)
bfin_write_NFC_CMD(cmd);
else
else if (ctrl & NAND_ALE)
bfin_write_NFC_ADDR(cmd);
SSYNC();
}
Expand Down

0 comments on commit fd508da

Please sign in to comment.