* reference implementation of runtime PM
@ 2010-12-06 17:57 Daniel Drake
2010-12-06 18:56 ` Ben Dooks
2010-12-06 20:03 ` Daniel Drake
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Drake @ 2010-12-06 17:57 UTC (permalink / raw)
To: linux-mmc
Hi,
I'm working on getting runtime pm working on the XO-1.5 laptop
(sdhci-pci) in case it is related to some other power-related issues
we have been having.
Right now, when runtime is enabled, the card cannot be brought back
online again after it has been powered off.
I've dug down and I think that runtime PM is doing basically nothing.
i.e. when the system decides to runtime-suspend my SD card, nothing
actually happens to the SD card. It remains fully powered and
untouched. I'm basing this assumption on mmc_power_save_host() which
relies entirely on host->bus_ops->power_save() doing the actual
power-down work. On sdhci this method does not exist.
I figure that if I write sdhci power_save and power_restore functions,
the problem might be solved.
I looked at the other host controllers hoping to get a feel for the
kind of thing that should be done in such a handler but didn't find
any host controller that implements this.
Is there a host controller patch somewhere that implements
power_save/power_restore? Maybe even for sdhci?
cheers,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: reference implementation of runtime PM
2010-12-06 17:57 reference implementation of runtime PM Daniel Drake
@ 2010-12-06 18:56 ` Ben Dooks
2010-12-06 20:03 ` Daniel Drake
1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-12-06 18:56 UTC (permalink / raw)
To: Daniel Drake; +Cc: linux-mmc
On Mon, Dec 06, 2010 at 05:57:22PM +0000, Daniel Drake wrote:
> Hi,
>
> I'm working on getting runtime pm working on the XO-1.5 laptop
> (sdhci-pci) in case it is related to some other power-related issues
> we have been having.
>
> Right now, when runtime is enabled, the card cannot be brought back
> online again after it has been powered off.
>
> I've dug down and I think that runtime PM is doing basically nothing.
> i.e. when the system decides to runtime-suspend my SD card, nothing
> actually happens to the SD card. It remains fully powered and
> untouched. I'm basing this assumption on mmc_power_save_host() which
> relies entirely on host->bus_ops->power_save() doing the actual
> power-down work. On sdhci this method does not exist.
you might want to add the linux-pm list to this.
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: reference implementation of runtime PM
2010-12-06 17:57 reference implementation of runtime PM Daniel Drake
2010-12-06 18:56 ` Ben Dooks
@ 2010-12-06 20:03 ` Daniel Drake
2010-12-06 21:42 ` Ohad Ben-Cohen
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2010-12-06 20:03 UTC (permalink / raw)
To: linux-mmc
On 6 December 2010 17:57, Daniel Drake <dsd@laptop.org> wrote:
> I've dug down and I think that runtime PM is doing basically nothing.
> i.e. when the system decides to runtime-suspend my SD card, nothing
> actually happens to the SD card. It remains fully powered and
> untouched. I'm basing this assumption on mmc_power_save_host() which
> relies entirely on host->bus_ops->power_save() doing the actual
> power-down work. On sdhci this method does not exist.
Sorry, I now realise there are a number of confusions in my earlier mail.
power_save is done by the bus, not the host, and the host does get its
opportunity to power down via the set_ios callback that comes in
telling it to turn the card off.
Still can't get our card to reset properly though. Tried sprinking
some sdhci_reset and sdhci_reinit calls around, no luck.
We do know that it can be powered down and up just fine at runtime via
mmc_stop_host then mmc_start_host. So there's something that happens
in that path which does not occur with runtime pm...
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: reference implementation of runtime PM
2010-12-06 20:03 ` Daniel Drake
@ 2010-12-06 21:42 ` Ohad Ben-Cohen
0 siblings, 0 replies; 4+ messages in thread
From: Ohad Ben-Cohen @ 2010-12-06 21:42 UTC (permalink / raw)
To: Daniel Drake; +Cc: linux-mmc
On Mon, Dec 6, 2010 at 10:03 PM, Daniel Drake <dsd@laptop.org> wrote:
> power_save is done by the bus, not the host, and the host does get its
> opportunity to power down via the set_ios callback that comes in
> telling it to turn the card off.
yes.
In fact, the actual work is being handled by mmc_power_off, and not by
the ->power_save() handler (which is not being used at all today).
>
> Still can't get our card to reset properly though. Tried sprinking
> some sdhci_reset and sdhci_reinit calls around, no luck.
>
> We do know that it can be powered down and up just fine at runtime via
> mmc_stop_host then mmc_start_host.
Just wondering.. how did you verify this ? rmmod/insmod your host controller ?
> So there's something that happens
> in that path which does not occur with runtime pm...
Then you can probably compare the flow (ftrace ?) and find the difference.
>
> Daniel
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-06 21:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-06 17:57 reference implementation of runtime PM Daniel Drake
2010-12-06 18:56 ` Ben Dooks
2010-12-06 20:03 ` Daniel Drake
2010-12-06 21:42 ` Ohad Ben-Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox