From: Jaehoon Chung <jh80.chung@samsung.com>
To: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
Cc: Will Newton <will.newton@imgtec.com>,
James Hogan <james.hogan@imgtec.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Matt Fleming <matt@console-pimps.org>,
Zhangfei Gao <zhangfei.gao@marvell.com>,
Philip Rakity <prakity@marvell.com>,
Wolfram Sang <w.sang@pengutronix.de>,
Shawn Guo <shawn.guo@linaro.org>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH v2 1/1] mmc: Support of PCI mode for the dw_mmc driver
Date: Fri, 30 Sep 2011 10:51:48 +0900 [thread overview]
Message-ID: <4E8520B4.7070504@samsung.com> (raw)
In-Reply-To: <1317318052-2750-1-git-send-email-shashidharh@vayavyalabs.com>
Hi Shashidhar.
On 09/30/2011 02:40 AM, Shashidhar Hiremath wrote:
> Support of PCI mode for the dw_mmc driver This Patch adds the support for the scenario where the Synopsys Designware IP is present on the PCI bus.The patch adds the minimal modifications necessary for the driver to work on PCI platform. The Driver has also been tested for on the PCI platform with single Card Slot.
>
> Signed-off-by: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
> ---
> v2:
> *As per Suggestions by Will Newton and James Hogan
> -Reduced the number of ifdefs
>
> drivers/mmc/host/Kconfig | 11 ++
> drivers/mmc/host/dw_mmc.c | 352 ++++++++++++++++++++++++++++++++++++++++++++
> drivers/mmc/host/dw_mmc.h | 13 ++
> include/linux/mmc/dw_mmc.h | 4 +
> 4 files changed, 380 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 8c87096..84d8908 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -526,6 +526,17 @@ config MMC_DW
> block, this provides host support for SD and MMC interfaces, in both
> PIO and external DMA modes.
>
> +config MMC_DW_PCI
> + bool "MMC_DW Support On PCI bus"
> + depends on MMC_DW && PCI
> + help
> + This selects the PCI for the Synopsys Designware Mobile Storage IP.
> +
> + If you have a controller with this interface, say Y or M here.
> +
> + If unsure, say N.
> +
> +
> config MMC_DW_IDMAC
> bool "Internal DMAC interface"
> depends on MMC_DW
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index ff0f714..0bd9e16 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -21,6 +21,7 @@
> #include <linux/interrupt.h>
> #include <linux/ioport.h>
> #include <linux/module.h>
> +#include <linux/pci.h>
> #include <linux/platform_device.h>
> #include <linux/scatterlist.h>
> #include <linux/seq_file.h>
> @@ -101,6 +102,7 @@ struct dw_mci_slot {
> int last_detect_state;
> };
>
> +
> static struct workqueue_struct *dw_mci_card_workqueue;
>
> #if defined(CONFIG_DEBUG_FS)
> @@ -682,6 +684,7 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> {
> struct dw_mci_slot *slot = mmc_priv(mmc);
> u32 regs;
> + u32 card_detect;
>
> /* set default 1 bit mode */
> slot->ctype = SDMMC_CTYPE_1BIT;
> @@ -716,6 +719,13 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> switch (ios->power_mode) {
> case MMC_POWER_UP:
> set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags);
> + /* Enable Power to the card that has been detected */
> + card_detect = mci_readl(slot->host, CDETECT);
> + /* Enabling power for card 0 when PCI is the interface */
> + mci_writel(slot->host, PWREN, ((~card_detect) & 0x1));
> + break;
> + case MMC_POWER_OFF:
> + mci_writel(slot->host, PWREN, 0);
> break;
Using shift with slot->id.(1bit per card).
Regards,
Jaehoon Chung
next prev parent reply other threads:[~2011-09-30 1:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 17:40 [PATCH v2 1/1] mmc: Support of PCI mode for the dw_mmc driver Shashidhar Hiremath
2011-09-30 1:51 ` Jaehoon Chung [this message]
2011-09-30 6:47 ` Shashidhar Hiremath
2011-09-30 8:42 ` James Hogan
2011-10-03 6:50 ` Shashidhar Hiremath
2011-10-03 8:31 ` James Hogan
2011-10-03 9:02 ` Shashidhar Hiremath
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=4E8520B4.7070504@samsung.com \
--to=jh80.chung@samsung.com \
--cc=james.hogan@imgtec.com \
--cc=linux-mmc@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=prakity@marvell.com \
--cc=shashidharh@vayavyalabs.com \
--cc=shawn.guo@linaro.org \
--cc=w.sang@pengutronix.de \
--cc=will.newton@imgtec.com \
--cc=zhangfei.gao@marvell.com \
/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