From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/8] mmc: mmci: Mask IRQs for all variants during runtime suspend
Date: Mon, 10 Mar 2014 13:49:37 +0100 [thread overview]
Message-ID: <CAPDyKFrMhHpwdoXpnG87zw2s=FPsvhfZoM4941ETbUNqFG75EQ@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKFr3fjuZa1mDK-FV5gEBynos5ox7LtKf-kMgiSupPiKpJw@mail.gmail.com>
On 10 March 2014 13:46, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On 1 March 2014 11:56, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>> In runtime suspended state, we are not expecting IRQs and thus we can
>> safely mask them, not only for pwrreg_nopower variants but for all.
>>
>> Obviously we then also need to make sure we restore the IRQ mask while
>> becoming runtime resumed.
>>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> Hi Russell,
>
> I suppose we have discussed and sorted out the concerns you had around
> this patch!?
>
> It's available in your patch tracker, would be nice to get it merged
> for 3.15, if that's possible.
>
> Kind regards
> Uffe
Sorry for spamming, this went to the wrong addresses. Let's try again.
Kind regards
Uffe
>
>> ---
>> drivers/mmc/host/mmci.c | 23 +++++++++++------------
>> 1 file changed, 11 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
>> index b931226..178868a 100644
>> --- a/drivers/mmc/host/mmci.c
>> +++ b/drivers/mmc/host/mmci.c
>> @@ -1758,35 +1758,34 @@ static void mmci_save(struct mmci_host *host)
>> {
>> unsigned long flags;
>>
>> - if (host->variant->pwrreg_nopower) {
>> - spin_lock_irqsave(&host->lock, flags);
>> + spin_lock_irqsave(&host->lock, flags);
>>
>> - writel(0, host->base + MMCIMASK0);
>> + writel(0, host->base + MMCIMASK0);
>> + if (host->variant->pwrreg_nopower) {
>> writel(0, host->base + MMCIDATACTRL);
>> writel(0, host->base + MMCIPOWER);
>> writel(0, host->base + MMCICLOCK);
>> - mmci_reg_delay(host);
>> -
>> - spin_unlock_irqrestore(&host->lock, flags);
>> }
>> + mmci_reg_delay(host);
>>
>> + spin_unlock_irqrestore(&host->lock, flags);
>> }
>>
>> static void mmci_restore(struct mmci_host *host)
>> {
>> unsigned long flags;
>>
>> - if (host->variant->pwrreg_nopower) {
>> - spin_lock_irqsave(&host->lock, flags);
>> + spin_lock_irqsave(&host->lock, flags);
>>
>> + if (host->variant->pwrreg_nopower) {
>> writel(host->clk_reg, host->base + MMCICLOCK);
>> writel(host->datactrl_reg, host->base + MMCIDATACTRL);
>> writel(host->pwr_reg, host->base + MMCIPOWER);
>> - writel(MCI_IRQENABLE, host->base + MMCIMASK0);
>> - mmci_reg_delay(host);
>> -
>> - spin_unlock_irqrestore(&host->lock, flags);
>> }
>> + writel(MCI_IRQENABLE, host->base + MMCIMASK0);
>> + mmci_reg_delay(host);
>> +
>> + spin_unlock_irqrestore(&host->lock, flags);
>> }
>>
>> static int mmci_runtime_suspend(struct device *dev)
>> --
>> 1.7.9.5
>>
next prev parent reply other threads:[~2014-03-10 12:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-01 10:56 [PATCH V3 0/8] PM / Sleep / Runtime: Fixup some driver's system suspend Ulf Hansson
2014-03-01 10:56 ` [PATCH V3 1/8] PM / Runtime: Fetch runtime PM callbacks using a macro Ulf Hansson
2014-03-01 10:56 ` [PATCH V3 2/8] PM / Sleep / Runtime: Add pm_runtime_suspend|resume_force functions Ulf Hansson
2014-03-03 8:30 ` Kevin Hilman
2014-03-01 10:56 ` [PATCH 3/8] spi: pl022: Let runtime PM callbacks be available for CONFIG_PM Ulf Hansson
2014-03-06 4:45 ` Mark Brown
2014-03-01 10:56 ` [PATCH 4/8] spi: pl022: Don't ignore power domain and amba bus at system suspend Ulf Hansson
2014-03-06 4:45 ` Mark Brown
2014-03-01 10:56 ` [PATCH 5/8] i2c: nomadik: Fixup " Ulf Hansson
2014-03-06 7:10 ` Ulf Hansson
2014-03-01 10:56 ` [PATCH 6/8] mmc: mmci: Mask IRQs for all variants during runtime suspend Ulf Hansson
2014-03-10 12:46 ` Ulf Hansson
2014-03-10 12:49 ` Ulf Hansson [this message]
2014-03-01 10:56 ` [PATCH 7/8] mmc: mmci: Let runtime PM callbacks be available for CONFIG_PM Ulf Hansson
2014-03-01 10:56 ` [PATCH 8/8] mmc: mmci: Put the device into low power state at system suspend Ulf Hansson
2014-03-01 23:38 ` [PATCH V3 0/8] PM / Sleep / Runtime: Fixup some driver's " Rafael J. Wysocki
2014-03-03 7:29 ` Ulf Hansson
2014-03-05 6:16 ` Mark Brown
2014-03-05 13:02 ` Rafael J. Wysocki
2014-03-06 4:43 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-02-20 15:31 [PATCH " Ulf Hansson
2014-02-20 15:31 ` [PATCH 6/8] mmc: mmci: Mask IRQs for all variants during runtime suspend Ulf Hansson
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='CAPDyKFrMhHpwdoXpnG87zw2s=FPsvhfZoM4941ETbUNqFG75EQ@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=linux-arm-kernel@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).