[U-Boot] [PATCH] mmc: fix capacity calculation with high capacity mmc

Lei Wen adrian.wenl at gmail.com
Sun Sep 19 10:27:05 CEST 2010


Dear Reinhard,

On Sun, Sep 19, 2010 at 12:32 PM, Reinhard Meyer
<u-boot at emk-elektronik.de> wrote:
> Dear Wolfgang Denk, Lei Wen, Andy Fleming,
>>
>> Dear Lei Wen,
>>
>> In message<AANLkTimaQtTCJf52DjF-AhdEfFQbHfwyeJD3024VwFWu at mail.gmail.com>
>>  you wrote:
>>>
>>> How about merge this patch? :-)
>>
>> I will wait for a pull request from the responsible custodian.
>>
>> Maybe you should have put him on cc: ...  (done now).
>
> @@ -441,6 +441,11 @@ int mmc_change_freq(struct mmc *mmc)
>>>>       if (!ext_csd[185])
>>>>               return 0;
>>>>
>>>> +     if (!IS_SD(mmc) && mmc->high_capacity) {
>>>> +             mmc->capacity = ext_csd[212] | (ext_csd[213] << 8)
>>>> +                     | (ext_csd[214] << 16) | (ext_csd[215] << 24);
>>>> +             mmc->capacity *= mmc->read_bl_len;
>>>> +     }
>>>>       /* High Speed is set, there are two types: 52MHz and 26MHz */
>>>>
> I am still convinced "mmc_change_freq()" is the wrong place to do that
> calculation. All other card types do it around line 700...
>
But in other place, how could we get the ext_csd info? If you could let me
get this line at the line, as you said 700, I am fine to put this code
to there...

Thanks,
Lei


More information about the U-Boot mailing list