]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: gpmi: decouple the chip select from the DMA channel
authorHuang Shijie <b32955@freescale.com>
Tue, 27 Aug 2013 09:29:04 +0000 (17:29 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 23 Oct 2013 22:45:26 +0000 (15:45 -0700)
Decouple the chip select from the DMA channel, we use the DMA channel 0
to accecc all the nand devices.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/gpmi-nand/gpmi-lib.c
drivers/mtd/nand/gpmi-nand/gpmi-regs.h

index 4f8857fa48a7f93f502e7b0d1a2581eebac64234..7d56d87599c00c69aa3e611bacf99c09a9364370 100644 (file)
@@ -187,6 +187,12 @@ int gpmi_init(struct gpmi_nand_data *this)
        /* Select BCH ECC. */
        writel(BM_GPMI_CTRL1_BCH_MODE, r->gpmi_regs + HW_GPMI_CTRL1_SET);
 
+       /*
+        * Decouple the chip select from dma channel. We use dma0 for all
+        * the chips.
+        */
+       writel(BM_GPMI_CTRL1_DECOUPLE_CS, r->gpmi_regs + HW_GPMI_CTRL1_SET);
+
        gpmi_disable_clk(this);
        return 0;
 err_out:
index 53397cc290fcb522c921d746e768a649de663335..82114cdc8330574ad418fbde6e51d7efb2d4da44 100644 (file)
 #define HW_GPMI_CTRL1_CLR                              0x00000068
 #define HW_GPMI_CTRL1_TOG                              0x0000006c
 
+#define BP_GPMI_CTRL1_DECOUPLE_CS                      24
+#define BM_GPMI_CTRL1_DECOUPLE_CS      (1 << BP_GPMI_CTRL1_DECOUPLE_CS)
+
 #define BP_GPMI_CTRL1_WRN_DLY_SEL                      22
 #define BM_GPMI_CTRL1_WRN_DLY_SEL      (0x3 << BP_GPMI_CTRL1_WRN_DLY_SEL)
 #define BF_GPMI_CTRL1_WRN_DLY_SEL(v)  \