From: Huang Shijie <b32955@freescale.com>
To: <dwmw2@infradead.org>
Cc: Huang Shijie <b32955@freescale.com>,
computersforpeace@gmail.com, linux-mtd@lists.infradead.org,
dedekind1@gmail.com
Subject: [PATCH V2 1/4] mtd: gpmi: decouple the chip select from the DMA channel
Date: Tue, 27 Aug 2013 17:29:04 +0800 [thread overview]
Message-ID: <1377595747-21033-2-git-send-email-b32955@freescale.com> (raw)
In-Reply-To: <1377595747-21033-1-git-send-email-b32955@freescale.com>
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>
---
drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 6 ++++++
drivers/mtd/nand/gpmi-nand/gpmi-regs.h | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 4f8857f..7d56d87 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -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:
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-regs.h b/drivers/mtd/nand/gpmi-nand/gpmi-regs.h
index 53397cc..82114cd 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-regs.h
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-regs.h
@@ -108,6 +108,9 @@
#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) \
--
1.7.1
next prev parent reply other threads:[~2013-08-27 9:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 9:29 [PATCH V2 0/4] mtd: gpmi: support two nand chips at most Huang Shijie
2013-08-27 9:29 ` Huang Shijie [this message]
2013-08-27 9:29 ` [PATCH V2 2/4] mtd: gpmi: use DMA channel 0 for all the nand chips Huang Shijie
2013-08-27 17:05 ` Vikram Narayanan
2013-08-28 2:19 ` Huang Shijie
2013-08-27 9:29 ` [PATCH V2 3/4] mtd: gpmi: scan two " Huang Shijie
2013-08-27 9:29 ` [PATCH V2 4/4] mtd: gpmi: imx6: fix the wrong method for checking ready/busy Huang Shijie
2013-09-25 2:45 ` [PATCH V2 0/4] mtd: gpmi: support two nand chips at most Huang Shijie
2013-10-18 6:50 ` Huang Shijie
2013-10-19 2:01 ` Brian Norris
2013-10-21 3:40 ` Huang Shijie
2013-10-21 6:01 ` Gupta, Pekon
2013-10-21 8:32 ` Huang Shijie
2013-10-21 9:02 ` Gupta, Pekon
2013-10-22 8:16 ` Huang Shijie
2013-10-22 8:34 ` Sourav Poddar
2013-10-22 9:03 ` Huang Shijie
2013-10-23 22:37 ` Brian Norris
2013-10-23 22:59 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377595747-21033-2-git-send-email-b32955@freescale.com \
--to=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).