[U-Boot] [PATCH v2 2/4] mmc: s5p_mmc: fixed wrong function argument

Jaehoon Chung jh80.chung at samsung.com
Fri Aug 31 03:14:44 CEST 2012


Hi Andy,
>> @@ -80,12 +80,11 @@ int s5p_sdhci_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
>>
>>         host->name = S5P_NAME;
>>         host->ioaddr = (void *)regbase;
>> -       host->quirks = quirks;
> 
> 
> I'm very confused by this line. "quirks" is the 4th argument to the
> original version of this function, but I see that the original
> *caller* of this function passed in "index". This is amazingly broken.
> Fortunately, your patch fixes it, but it calls into doubt how it ever
> worked with any index but "0".
It's just lucky. Because We are using the index "0" for eMMC card.
So i fixed this problem.
> 
> 
>>
>> -       host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
>> +       host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
>>                 SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR;
>>         host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
>> -       if (quirks & SDHCI_QUIRK_REG32_RW)
>> +       if (host->quirks & SDHCI_QUIRK_REG32_RW)
> 
> 
> Now that host->quirks is initialized just above, SDHCI_QUIRK_REG32_RW
> will never be set, so there's no point in checking for it.
Right, we can remove that. i will fix.

Best Regards,
Jaehoon Chung
> 
> 
> Andy
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 



More information about the U-Boot mailing list