Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292318

Re: [RESEND PATCH v4 3/3] mmc: sdhci-of-arasan: add runtime pm support

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH v4 3/3] mmc: sdhci-of-arasan: add runtime pm support
Date 2015-12-15 17:20 +0100
Message-ID <qG0ut-6y5-7@gated-at.bofh.it> (permalink)
References <qmk2K-69B-31@gated-at.bofh.it> <qmmQW-1Wt-19@gated-at.bofh.it> <qmBwB-6jE-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Shawn,

Sorry for the delay.

[...]

>>
>> I think your are in right track, but unfortunate you still have some
>> work to do. :-)
>>
>> You can't call sdhci_suspend_host() with a runtime suspended host. You
>> will for example access sdhci internal registers, even-though the
>> clock to the SDHCI controller is gated, which is not a good idea.
>>
>> Now, this leads me to the following questions/ideas, which I am really
>> glad we can bring up within this context.
>>
>> So, sdhci_suspend_host() and sdhci_runtime_suspend_host() performs
>> very similar actions, but not completely the same.
>>
>> I have a feeling that we might be able to merge the above functions
>> into one function. The only thing that may differ between system PM
>> and runtime PM, is probably the wakeup settings and since that is
>> possible to control before the sdhci variant host driver decide to
>> call these functions, merging them might work.
>>
>>> From a wakeup point of view, does your case have different settings
>>
>> between system PM and runtime PM?
>>
>> What do you think?
>
>
> My case doesn't have diff settings between system PM and runtime PM.

Okay!

> If my understanding is proper, I guess you want to remove
> sdhci_suspend|resume_host and assign  pm_runtime_force_suspend|resume to
> SET_SYSTEM_SLEEP_PM_OPS directly by sdhci variant HCs?
>

Yes.

You may have a look at the following commit from Ludovic, which is
queued for 4.5 on my next branch. That should give you an idea.

"mmc: sdhci-of-at91: add PM support"

> If that is the case, I guess we should look more precisely into other
> sdhci variant HCs to check whether they need to do diff things for system PM
> and RPM or not.

Yes, please! It would be nice to get that code to actually work.
Currently it's mostly broken when runtime PM is enabled.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [RESEND PATCH v4 3/3] mmc: sdhci-of-arasan: add runtime pm support Ulf Hansson <ulf.hansson@linaro.org> - 2015-12-15 17:20 +0100

csiph-web