From: Balaji T K <balajitk@ti.com>
To: Balaji T K <balajitk@ti.com>
Cc: linux-mmc@vger.kernel.org, chris@printf.net,
linux-omap@vger.kernel.org, Andreas Fenkart <afenkart@gmail.com>
Subject: Re: [PATCH 9/9] mmc: omap_hsmmc: enable wakeup event for sdio
Date: Fri, 2 May 2014 21:03:21 +0530 [thread overview]
Message-ID: <5363BAC1.2040201@ti.com> (raw)
In-Reply-To: <1395418658-2375-10-git-send-email-balajitk@ti.com>
On Friday 21 March 2014 09:47 PM, Balaji T K wrote:
> To detect sdio irqs properly without spurious events,
> OMAP4 needs IWE in CON and CTPL, CLKEXTFREE in HCTL to be set
>
> Signed-off-by: Balaji T K <balajitk@ti.com>
Hi Andreas,
Can you please test this patch on top of your current(v10) series
and confirm that there are no regression due to this
additional programming on your am335x platform.
Thanks and Regards,
Balaji T K
> ---
> drivers/mmc/host/omap_hsmmc.c | 13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 2482783..120f7cf 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -94,7 +94,10 @@
> #define BCE (1 << 1)
> #define FOUR_BIT (1 << 1)
> #define HSPE (1 << 2)
> +#define IWE (1 << 24)
> #define DDR (1 << 19)
> +#define CLKEXTFREE (1 << 16)
> +#define CTPL (1 << 11)
> #define DW8 (1 << 5)
> #define OD 0x1
> #define STAT_CLEAR 0xFFFFFFFF
> @@ -732,6 +735,8 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
> capa = VS18;
> }
>
> + if (host->mmc->caps & MMC_CAP_SDIO_IRQ)
> + hctl |= IWE;
> OMAP_HSMMC_WRITE(host->base, HCTL,
> OMAP_HSMMC_READ(host->base, HCTL) | hctl);
>
> @@ -1728,7 +1733,7 @@ static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card)
> static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
> {
> struct omap_hsmmc_host *host = mmc_priv(mmc);
> - u32 irq_mask;
> + u32 irq_mask, con;
> unsigned long flags;
>
> if (enable)
> @@ -1737,14 +1742,18 @@ static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
> if (host->flags & HSMMC_RUNTIME_SUSPENDED)
> goto out;
>
> + con = OMAP_HSMMC_READ(host->base, CON);
> irq_mask = OMAP_HSMMC_READ(host->base, ISE);
> if (enable) {
> host->flags |= HSMMC_SDIO_IRQ_ENABLED;
> irq_mask |= CIRQ_EN;
> + con |= CTPL | CLKEXTFREE;
> } else {
> host->flags &= ~HSMMC_SDIO_IRQ_ENABLED;
> irq_mask &= ~CIRQ_EN;
> + con &= ~(CTPL | CLKEXTFREE);
> }
> + OMAP_HSMMC_WRITE(host->base, CON, con);
> OMAP_HSMMC_WRITE(host->base, IE, irq_mask);
>
> /*
> @@ -1801,6 +1810,8 @@ static int omap_hsmmc_configure_wake_irq(struct omap_hsmmc_host *host)
> }
> host->flags |= HSMMC_SWAKEUP_QUIRK;
> }
> + OMAP_HSMMC_WRITE(host->base, HCTL,
> + OMAP_HSMMC_READ(host->base, HCTL) | IWE);
>
> return 0;
> }
>
next prev parent reply other threads:[~2014-05-02 15:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 12:20 [PATCH v9 resend 0/3] mmc: omap_hsmmc: Enable SDIO IRQ Andreas Fenkart
2014-03-21 12:20 ` [PATCH v9 resend 1/3] mmc: omap_hsmmc: Enable SDIO interrupt Andreas Fenkart
2014-03-21 16:10 ` Balaji T K
2014-03-24 9:30 ` Dmitry Lifshitz
2014-04-18 16:46 ` Tony Lindgren
2014-03-21 16:17 ` [PATCH 0/9] mmc: omap_hsmmc: convert to use devm_* and enable sdio irq Balaji T K
2014-03-21 16:17 ` [PATCH 1/9] mmc: omap_hsmmc: use devm_clk_get Balaji T K
2014-03-21 16:17 ` [PATCH 2/9] mmc: omap_hsmmc: use devm_request_irq Balaji T K
2014-03-21 16:17 ` [PATCH 3/9] mmc: omap_hsmmc: use devm_request_threaded_irq Balaji T K
2014-03-21 16:17 ` [PATCH 4/9] mmc: omap_hsmmc: use devm_request_mem_region Balaji T K
2014-03-21 16:18 ` Felipe Balbi
2014-03-21 16:27 ` Balaji T K
2014-03-21 16:30 ` Felipe Balbi
2014-03-21 16:17 ` [PATCH 5/9] mmc: omap_hsmmc: use devm_ioremap Balaji T K
2014-03-21 16:17 ` [PATCH 6/9] mmc: omap_hsmmc: Enable SDIO interrupt Balaji T K
2014-03-24 12:43 ` Ulf Hansson
2014-03-24 14:59 ` Andreas Fenkart
2014-03-24 16:02 ` Ulf Hansson
2014-03-24 16:34 ` Andreas Fenkart
2014-03-25 8:07 ` Ulf Hansson
2014-03-25 15:19 ` Balaji T K
2014-03-30 22:43 ` Andreas Fenkart
2014-03-21 16:17 ` [PATCH 7/9] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x Balaji T K
2014-03-21 16:17 ` [PATCH 8/9] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux Balaji T K
2014-03-21 16:17 ` [PATCH 9/9] mmc: omap_hsmmc: enable wakeup event for sdio Balaji T K
2014-05-02 15:33 ` Balaji T K [this message]
2014-03-21 12:20 ` [PATCH v9 resend 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x Andreas Fenkart
2014-03-21 12:20 ` [PATCH v9 resend 3/3] mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux Andreas Fenkart
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=5363BAC1.2040201@ti.com \
--to=balajitk@ti.com \
--cc=afenkart@gmail.com \
--cc=chris@printf.net \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.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).