From: Hein_Tibosch <hein_tibosch@yahoo.es>
To: Huang Changming-R66093 <r66093@freescale.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
ulf.hansson@stericsson.com, Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()
Date: Wed, 07 Dec 2011 11:37:06 +0800 [thread overview]
Message-ID: <4EDEDF62.70705@yahoo.es> (raw)
In-Reply-To: <8A2FC72B45BB5A4C9F801431E06AE48F116342A2@039-SN1MPN1-005.039d.mgd.msft.net>
Hi Jerry,
On 12/7/2011 10:23 AM, Huang Changming-R66093 wrote:
>
>> -----Original Message-----
>> From: Hein_Tibosch [mailto:hein_tibosch@yahoo.es]
>> Sent: Tuesday, December 06, 2011 8:13 PM
>> To: Huang Changming-R66093
>> Cc: linux-mmc@vger.kernel.org; Huang Changming-R66093; Chris Ball
>> Subject: Re: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()
>>
>> <cut>
>>> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index
>>> a08e6b1..2d40c04 100644
>>> --- a/drivers/mmc/core/core.c
>>> +++ b/drivers/mmc/core/core.c
>>> @@ -1253,7 +1253,10 @@ static void mmc_power_up(struct mmc_host *host)
>>> */
>>> mmc_delay(10);
>>>
>>> - host->ios.clock = host->f_init;
>>> + if (host->f_init)
>>> + host->ios.clock = host->f_init;
>>> + else
>>> + host->ios.clock = host->f_min;
>> Are you sure f_min can have a value of zero?
>> It should have been set mmc_rescan_try_freq(), when trying a list of
>> frequencies: 400000, 300000, 200000, 100000
>>
> But, mmc_power_up is called not only by mmc_rescan_try_freq, so the value of f_init may be zero.
Ok, I see: mmc_power_up() used to be called only after mmc_rescan_try_freq(),
but now you want to call it earlier, because get_cd() *might* need it,
even if get_cd is not defined...
Still I wonder whether it's good to power-up each and every card:
+ mmc_power_up(host);
if (host->ops->get_cd && host->ops->get_cd(host) == 0)
goto out;
+ mmc_power_off(host);
before initialization starts. Remember earlier complaints that f_min is
extremely low on some platforms and therefor f_init was introduced.
Hein
next prev parent reply other threads:[~2011-12-07 4:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-06 9:18 [PATCH 1/5 v2] MMC/core: Make sure the power is up, when detect the card r66093
2011-12-06 9:18 ` [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on() r66093
2011-12-06 12:13 ` Hein_Tibosch
2011-12-06 12:18 ` Hein_Tibosch
2011-12-07 2:23 ` Huang Changming-R66093
2011-12-07 3:37 ` Hein_Tibosch [this message]
2011-12-07 7:45 ` Huang Changming-R66093
2011-12-06 12:12 ` [PATCH 1/5 v2] MMC/core: Make sure the power is up, when detect the card Hein_Tibosch
2011-12-07 2:26 ` Huang Changming-R66093
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=4EDEDF62.70705@yahoo.es \
--to=hein_tibosch@yahoo.es \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=r66093@freescale.com \
--cc=ulf.hansson@stericsson.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.