Commit 6a5a297c authored by Richard Purdie's avatar Richard Purdie Committed by David Woodhouse

MTD: [NAND] Fix the sharpsl driver after breakage from a core conversion

The CNE bits are inverted on the device and writeb function is missing a
NOT operation.
Signed-off-by: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 8b0036ee
...@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand_default_partition_info[] = { ...@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand_default_partition_info[] = {
/* /*
* hardware specific access to control-lines * hardware specific access to control-lines
* ctrl: * ctrl:
* NAND_CNE: bit 0 -> bit 0 & 4 * NAND_CNE: bit 0 -> ! bit 0 & 4
* NAND_CLE: bit 1 -> bit 1 * NAND_CLE: bit 1 -> bit 1
* NAND_ALE: bit 2 -> bit 2 * NAND_ALE: bit 2 -> bit 2
* *
...@@ -92,7 +92,10 @@ static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd, ...@@ -92,7 +92,10 @@ static void sharpsl_nand_hwcontrol(struct mtd_info *mtd, int cmd,
unsigned char bits = ctrl & 0x07; unsigned char bits = ctrl & 0x07;
bits |= (ctrl & 0x01) << 4; bits |= (ctrl & 0x01) << 4;
writeb((readb(FLASHCTL) & 0x17) | bits, FLASHCTL);
bits ^= 0x11;
writeb((readb(FLASHCTL) & ~0x17) | bits, FLASHCTL);
} }
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