On Monday, October 03, 2011 11:03:56 AM Lei Wen wrote:
> For we don't know mmc bus width from reading registers, the only way
> to check is to test.
> 
> Change-Id: Ia50df480bd14349e36ac8217d8d290cf732db089
> Signed-off-by: Lei Wen <[email protected]>
> ---

[...]

> +                     if (!err && ext_csd[160] == test_csd[160]
> +                         && ext_csd[175] == test_csd[175]
> +                         && ext_csd[192] == test_csd[192]
> +                         && ext_csd[224] == test_csd[224]
> +                         && memcmp(&ext_csd[212], &test_csd[212], 4) == 0) {
> +                             mmc->card_caps |= width;
> +                             break;
> +                     }
>               }
> 
>               if (mmc->card_caps & MMC_MODE_HS) {

Hi Lei,

I see you're accessing the ext_csd via some magic constants. Can you possibly 
convert it to structure-based access ? Like struct ext_csd csd; csd->member ... 
?

Cheers
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to