From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: "Michal Suchanek"
<hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
"Maxime Ripard"
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
"David Lanzendörfer"
<david.lanzendoerfer-Z7Kmv9EsliU@public.gmane.org>,
"Chen-Yu Tsai" <wens-jdAy2FN1RRM@public.gmane.org>,
"Peter Griffin"
<peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-mmc <linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 2/2] mmc: sunxi: Also set SDXC_LOW_POWER_ON
Date: Thu, 28 May 2015 10:04:28 +0200 [thread overview]
Message-ID: <5566CC0C.1050103@redhat.com> (raw)
In-Reply-To: <CAPDyKFrvB1AZGdvQ1fb6ShC8v-3DbVabiki13L8gG7M2saJALA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi,
On 28-05-15 10:02, Ulf Hansson wrote:
> On 25 May 2015 at 09:02, Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> Hi,
>>
>> On 24-05-15 20:04, Michal Suchanek wrote:
>>>
>>> The function sunxi_mmc_oclk_onoff filters out the SDXC_LOW_POWER_ON flag
>>> but never sets it.
>>>
>>> Set SDXC_LOW_POWER_ON when oclk is disabled.
>>
>>
>> Nack, looking at the datasheet I do not thing this patch actually
>> does anything, according to the datasheet setting this bit to 1 results
>> in: "Turn off card clock when FSM in IDLE state", iow this does mmc clock
>> gating on idle automatically in hardware, since we completely disable the
>> clock on clock-off by clearing SDXC_CARD_CLOCK_ON setting this bit on
>> clock-off is a nop.
>>
>> We could consider actually setting this to safe power when setting the clock
>> on, for doing that it would be good to look at the android code and see if
>> it ever sets this bit and if so when.
>>
>> WRT CONFIG_MMC_CLKGATE we are probably better off using SDXC_LOW_POWER_ON
>> then that when it is enabled. So maybe we should set SDXC_LOW_POWER_ON
>> based on #ifdef WRT CONFIG_MMC_CLKGATE, and have some way to tell the
>> mmc core to not do clock gating on this host ?
>
> I am planning to remove the entire thing for CONFIG_MMC_CLKGATE, maybe
> it's time to do that now!?
Removing it now sounds like a good plan to me, we would still need
to look into maybe enabling SDXC_LOW_POWER_ON on sunxi in some cases
to save power, but that is an orthogonal problem.
Regards,
Hans
next prev parent reply other threads:[~2015-05-28 8:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-24 18:25 [PATCH 0/2] sunxi a20 mmc timeout fix Michal Suchanek
[not found] ` <cover.1432491958.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-24 18:04 ` [PATCH 2/2] mmc: sunxi: Also set SDXC_LOW_POWER_ON Michal Suchanek
2015-05-25 7:02 ` Hans de Goede
[not found] ` <5562C90D.8070507-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-05-28 8:02 ` Ulf Hansson
[not found] ` <CAPDyKFrvB1AZGdvQ1fb6ShC8v-3DbVabiki13L8gG7M2saJALA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-28 8:04 ` Hans de Goede [this message]
2015-05-24 18:07 ` [PATCH 1/2] mmc: sunxi: fix timeout in sunxi_mmc_oclk_onoff Michal Suchanek
[not found] ` <4011290915a42fce8b9c19d59f3ca9c3289a6817.1432491958.git.hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-25 1:44 ` Julian Calaby
2015-05-25 6:58 ` Hans de Goede
2015-05-25 21:02 ` Maxime Ripard
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=5566CC0C.1050103@redhat.com \
--to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=david.lanzendoerfer-Z7Kmv9EsliU@public.gmane.org \
--cc=hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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).