From: Adrian Hunter <adrian.hunter@intel.com>
To: Thomas Hebb <tommyhebb@gmail.com>, linux-kernel@vger.kernel.org
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"open list:SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI...)"
<linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-pxav3: don't disable clocks when we might get an interrupt
Date: Tue, 15 May 2018 08:59:30 +0300 [thread overview]
Message-ID: <faf62b1f-1bb8-4518-368e-9d71ab1709ea@intel.com> (raw)
In-Reply-To: <20180514215645.17592-1-tommyhebb@gmail.com>
On 15/05/18 00:56, Thomas Hebb wrote:
> Currently, runtime_suspend() unconditionally disables the clock gates
> for the controller, which means that it's unable to receive interrupts
> generated by connected SDIO cards.
We currently get / put runtime pm with enable / disable of the SDIO IRQ
(refer sdhci_enable_sdio_irq()) so are you sure this is needed?
>
> Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
> ---
> drivers/mmc/host/sdhci-pxav3.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
> index a34434166ca7..59760f3cc1d7 100644
> --- a/drivers/mmc/host/sdhci-pxav3.c
> +++ b/drivers/mmc/host/sdhci-pxav3.c
> @@ -562,9 +562,11 @@ static int sdhci_pxav3_runtime_suspend(struct device *dev)
> if (host->tuning_mode != SDHCI_TUNING_MODE_3)
> mmc_retune_needed(host->mmc);
>
> - clk_disable_unprepare(pxa->clk_io);
> - if (!IS_ERR(pxa->clk_core))
> - clk_disable_unprepare(pxa->clk_core);
> + if (!sdhci_sdio_irq_enabled(host)) {
> + clk_disable_unprepare(pxa->clk_io);
> + if (!IS_ERR(pxa->clk_core))
> + clk_disable_unprepare(pxa->clk_core);
> + }
>
> return 0;
> }
> @@ -575,9 +577,11 @@ static int sdhci_pxav3_runtime_resume(struct device *dev)
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> struct sdhci_pxa *pxa = sdhci_pltfm_priv(pltfm_host);
>
> - clk_prepare_enable(pxa->clk_io);
> - if (!IS_ERR(pxa->clk_core))
> - clk_prepare_enable(pxa->clk_core);
> + if (!sdhci_sdio_irq_enabled(host)) {
> + clk_prepare_enable(pxa->clk_io);
> + if (!IS_ERR(pxa->clk_core))
> + clk_prepare_enable(pxa->clk_core);
> + }
>
> return sdhci_runtime_resume_host(host);
> }
>
next parent reply other threads:[~2018-05-15 5:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180514215645.17592-1-tommyhebb@gmail.com>
2018-05-15 5:59 ` Adrian Hunter [this message]
2018-05-15 6:18 ` [PATCH] mmc: sdhci-pxav3: don't disable clocks when we might get an interrupt Tom Hebb
2018-05-15 6:37 ` Adrian Hunter
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=faf62b1f-1bb8-4518-368e-9d71ab1709ea@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=tommyhebb@gmail.com \
--cc=ulf.hansson@linaro.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