On Mon, Sep 27, 2010 at 5:33 PM, David Vrabel <david.vra...@csr.com> wrote:
> zhangfei gao wrote:
>> On Mon, Sep 20, 2010 at 10:34 AM, David Vrabel <david.vra...@csr.com> wrote:
>>> zhangfei gao wrote:
>>>> index 5db49b1..9114c87 100644
>>>> --- a/drivers/mmc/core/core.c
>>>> +++ b/drivers/mmc/core/core.c
>>>> @@ -910,9 +910,9 @@ static void mmc_power_up(struct mmc_host *host)
>>>>       if (host->f_min > 400000) {
>>>>               pr_warning("%s: Minimum clock frequency too high for "
>>>>                               "identification mode\n", mmc_hostname(host));
>>>> -             host->ios.clock = host->f_min;
>>>> -     } else
>>>>               host->ios.clock = 400000;
>>>> +     } else
>>>> +             host->ios.clock = host->f_min;
>>> NAK.
>>>
>>> The code is already correctly requesting 400 kHz (unless the controller
>>> can't go that slow).
>>
>> Original code
>> if (host->f_min > 400000) {
>>                 pr_warning("%s: Minimum clock frequency too high for "
>>                                 "identification mode\n", mmc_hostname(host));
>>                 host->ios.clock = host->f_min;
>>         } else
>>                 host->ios.clock = 400000;
>>
>> With this code, the init clock is would be at lease 400 kHz, and no
>> matter how bigger the host->f_min it is, is this really correct?
>
> It's not clear what you're saying or why you think the original code is
> wrong.  Consider a host controller that reports a minimum frequency of 1
> Hz.  Obviously we wouldn't want to do the card identification at this
> clock rate, yes?

Thanks for your explanation.

The issue you met is f_min is too slow.
The issue we met is f_min is too high which also cause init fail,
But it is OK, we could prevent in other place, duringinit set
mmc->f_min = host->max_clk/256 in sdc 2.0 and mmc->f_min =
host->max_clk/2046 in sdc 3.0

Just curious how to get 400000, which is slowest speed for
initializaion, is this OK for all card?

>
> David
> --
> David Vrabel, Senior Software Engineer, Drivers
> CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
> Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/
>
>
> Member of the CSR plc group of companies. CSR plc registered in England and 
> Wales, registered number 4187346, registered office Churchill House, 
> Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to