]> err.no Git - linux-2.6/blobdiff - drivers/mtd/nand/ams-delta.c
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[linux-2.6] / drivers / mtd / nand / ams-delta.c
index c0e96860686e4b74ef8d403d8ef78e833baa3051..26d42987971fc9480520454fd2944e23c5f47641 100644 (file)
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <asm/io.h>
-#include <asm/arch/hardware.h>
+#include <mach/hardware.h>
 #include <asm/sizes.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/board-ams-delta.h>
+#include <mach/gpio.h>
+#include <mach/board-ams-delta.h>
 
 /*
  * MTD structure for E3 (Delta)
@@ -130,11 +130,13 @@ static void ams_delta_hwcontrol(struct mtd_info *mtd, int cmd,
        if (ctrl & NAND_CTRL_CHANGE) {
                unsigned long bits;
 
-               bits = (~ctrl & NAND_NCE) << 2;
-               bits |= (ctrl & NAND_CLE) << 7;
-               bits |= (ctrl & NAND_ALE) << 6;
+               bits = (~ctrl & NAND_NCE) ? AMS_DELTA_LATCH2_NAND_NCE : 0;
+               bits |= (ctrl & NAND_CLE) ? AMS_DELTA_LATCH2_NAND_CLE : 0;
+               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)
@@ -179,7 +181,6 @@ static int __init ams_delta_init(void)
        this->IO_ADDR_R = (OMAP_MPUIO_BASE + OMAP_MPUIO_INPUT_LATCH);
        this->IO_ADDR_W = (OMAP_MPUIO_BASE + OMAP_MPUIO_OUTPUT);
        this->read_byte = ams_delta_read_byte;
-       this->write_byte = ams_delta_write_byte;
        this->write_buf = ams_delta_write_buf;
        this->read_buf = ams_delta_read_buf;
        this->verify_buf = ams_delta_verify_buf;