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

Reinhard Meyer u-boot at emk-elektronik.de
Sun Sep 19 06:32:03 CEST 2010


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...

Best Regards,
Reinhard


More information about the U-Boot mailing list