Hi Marek,

On Mon, Oct 3, 2011 at 6:41 PM, Marek Vasut <marek.va...@gmail.com> wrote:
> 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 <lei...@marvell.com>
>> ---
>
> [...]
>
>> +                     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 
> ...

This suggestion is reasonable, I would do a magic number clean up in
the mmc.c together
with this patch.

Thanks,
Lei
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to