Commit fb8d81e4 authored by Jonathan McDowell's avatar Jonathan McDowell Committed by Linus Torvalds

[PATCH] MTD NAND: Fix ams-delta after core conversion

The recent hwctrl core conversion for MTD NAND devices broke the Amstrad
Delta driver.  This fixes it up and uses the existing control line defines
rather than unclear magic numbers.
Signed-off-by: default avatarJonathan McDowell <noodles@earth.li>
Acked-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d015baeb
...@@ -130,11 +130,13 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd, ...@@ -130,11 +130,13 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
if (ctrl & NAND_CTRL_CHANGE) { if (ctrl & NAND_CTRL_CHANGE) {
unsigned long bits; unsigned long bits;
bits = (~ctrl & NAND_NCE) << 2; bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0;
bits |= (ctrl & NAND_CLE) << 7; bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0;
bits |= (ctrl & NAND_ALE) << 6; bits |= (ctrl & NAND_ALE) ? AMS_DELTA_LATCH2_NAND_ALE : 0;
ams_delta_latch2_write(0xC2, bits); ams_delta_latch2_write(AMS_DELTA_LATCH2_NAND_CLE |
AMS_DELTA_LATCH2_NAND_ALE |
AMS_DELTA_LATCH2_NAND_NCE, bits);
} }
if (cmd != NAND_CMD_NONE) if (cmd != NAND_CMD_NONE)
......
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