MTD: [NAND] Fix the sharpsl driver after breakage from a core conversion
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Jul 15 08:59:01 EDT 2006
Commit: 6a5a297cf78e64ed68577f3e3480bc10abf0124b
Parent: 8b0036eefd7a96f23244b969417684c8627f5ad6
commit 6a5a297cf78e64ed68577f3e3480bc10abf0124b
Author: Richard Purdie <rpurdie at rpsys.net>
AuthorDate: Sat Jul 15 13:05:24 2006 +0100
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sat Jul 15 13:19:24 2006 +0100
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: Richard Purdie <rpurdie at rpsys.net>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/mtd/nand/sharpsl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index fbeedc3..51c7288 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand
/*
* hardware specific access to control-lines
* ctrl:
- * NAND_CNE: bit 0 -> bit 0 & 4
+ * NAND_CNE: bit 0 -> ! bit 0 & 4
* NAND_CLE: bit 1 -> bit 1
* NAND_ALE: bit 2 -> bit 2
*
@@ -92,7 +92,10 @@ static void sharpsl_nand_hwcontrol(struc
unsigned char bits = ctrl & 0x07;
bits |= (ctrl & 0x01) << 4;
- writeb((readb(FLASHCTL) & 0x17) | bits, FLASHCTL);
+
+ bits ^= 0x11;
+
+ writeb((readb(FLASHCTL) & ~0x17) | bits, FLASHCTL);
}
if (cmd != NAND_CMD_NONE)
More information about the linux-mtd-cvs
mailing list