]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MTD: [NAND] Fix the sharpsl driver after breakage from a core conversion
authorRichard Purdie <rpurdie@rpsys.net>
Sat, 15 Jul 2006 12:05:24 +0000 (13:05 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 15 Jul 2006 12:19:24 +0000 (13:19 +0100)
The CNE bits are inverted on the device and writeb function is missing a
NOT operation.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/sharpsl.c

index fbeedc3184e913c97c954588ba7db54a604d07e6..51c7288ab49a0fe4e0d251ba35c680e651378c58 100644 (file)
@@ -78,7 +78,7 @@ static struct mtd_partition sharpsl_nand_default_partition_info[] = {
 /*
  *     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(struct mtd_info *mtd, int cmd,
                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)