[Letux-kernel] Fwd: mmc PM regression

Andreas Kemnade andreas at kemnade.info
Sun Feb 7 22:22:17 CET 2016

Hi Nikolaus,

On Sun, 7 Feb 2016 10:53:38 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> Hi Andreas,
> > Am 07.02.2016 um 10:06 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > 
> > Hi Nikolaus,
> > 
> > On Fri, 5 Feb 2016 19:30:27 +0100
> > "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> > 
> >>> &mmc2 {
> >>>       vmmc-supply = <&vaux4>;
> >>>       bus-width = <4>;
> >>>       ti,non-removable;
> >>>       cap-power-off-card;     /* remove! */ <----
> >>> };
> >>> What about the "remove!" here? What are the plans/ideas/problems here?  
> >> 
> >> I don't know.
> >> 
> > If I understand that correctly, then that is about what to do with vaux4.
> > Thats why I asked my question below.
> > 
> >>> Was it once enabled and caused problems?
> >>> 277acf4b545327104c9b779eec7c440285d11a39
> >>> looks like that.  
> >> 
> >> That is heritage from Neil nobody else was able to understand so far...
> >> 
> >>> 
> >>> Is the idea to never switch off vaux4? At least everything
> >>> regarding sdio suspend/remove/resume should be tested in both ways  
> >> 
> >> No, vaux4 must be turned off if we neither need WLAN nor BT.
> >> 
> > It should. But *must* it be turned off?
> Yes. It is also shared with the Bluetooth side... So if you keep the WLAN
> running we will also have ~50mA for bluetooth.
BT seems to have quite good power saving.
I have booted 4.5rc2 with init=/bin/bash
loading modules, ifconfig wlan0 up (no connection), 
hciattach, hciconfig hci0 up
and running l2ping gives 90mA total consumption, around 80mA without l2ping.

> > Are there any other reason besides saving a few mA (which is of course
> > important)?
> Very important, and more important than everything else...
That does not answer my question. 

There might be a board with a libertas wifi chip which does not have its separate
power rail. And the reset pin is at some system reset chip. And therefore
the card is never powered down but only reset/shutdown via sd commands. If I understand
the mmc system correctly (I am not as deep in there as I am in libertas), such
a situation is indicated to the kernel by not specifying "cap-power-off-card;"
in devicetree which is indicated by not having MMC_CAP_POWER_OFF_CARD in host->caps.
At first glance that is not important for us but:

1. That strange patch by Neil changes exactly behaviour in such
situations so for upstreaming that one we need an argument that it does not create

2. At the moment working at that area feels like trying to get a few spaghetti from
the plate and instead getting a bunch that does not fit into my mouth.
Having the reset/enable stuff moved out of the way (for testing) should simplify
finding bugs. (the "remove" comment might indicates IMHO such a thing)

Next thing I do is insert some more debug output around the reset thing.
The puzzle starts to form in my head...

After bringing 6 patches into wireless-next I feel encouraged to do the same
with the needed ones of the remaing patches (max. 5).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20160207/1916c0ad/attachment.asc>

More information about the Letux-kernel mailing list