Re: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jerry,
On 12/7/2011 10:23 AM, Huang Changming-R66093 wrote:
>
>> -----Original Message-----
>> From: Hein_Tibosch [mailto:hein_tibosch@xxxxxxxx]
>> Sent: Tuesday, December 06, 2011 8:13 PM
>> To: Huang Changming-R66093
>> Cc: linux-mmc@xxxxxxxxxxxxxxx; 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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux