]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/nand/sharpsl.c
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / drivers / mtd / nand / sharpsl.c
index fbeedc3184e913c97c954588ba7db54a604d07e6..033f8800b1e69224d81c15dd670bc24e95190a7f 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)
@@ -162,7 +165,7 @@ static int __init sharpsl_nand_init(void)
                return -ENOMEM;
        }
 
-       /* map physical adress */
+       /* map physical address */
        sharpsl_io_base = ioremap(sharpsl_phys_base, 0x1000);
        if (!sharpsl_io_base) {
                printk("ioremap to access Sharp SL NAND chip failed\n");