[U-Boot] [PATCH] mmc: sti_sdhci: Fix sdhci_setup_cfg() call.

Patrice CHOTARD patrice.chotard at st.com
Wed Jul 24 07:35:11 UTC 2019


Hi Peng

On 7/24/19 4:21 AM, Peng Fan wrote:
>> Subject: [PATCH] mmc: sti_sdhci: Fix sdhci_setup_cfg() call.
>>
>> host->mmc and host->mmc->dev must be set before calling
>> sdhci_setup_cfg() to avoid hang during mmc initialization.
>>
>> Thanks to commit 3d296365e4e8
>> ("mmc: sdhci: Add support for sdhci-caps-mask") which put this issue into
>> evidence.
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
>> ---
>>
>>  drivers/mmc/sti_sdhci.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c index
>> 8ed47e113d..c7f1947edd 100644
>> --- a/drivers/mmc/sti_sdhci.c
>> +++ b/drivers/mmc/sti_sdhci.c
>> @@ -97,14 +97,14 @@ static int sti_sdhci_probe(struct udevice *dev)
>>  		       SDHCI_QUIRK_NO_HISPD_BIT;
>>
>>  	host->host_caps = MMC_MODE_DDR_52MHz;
>> +	host->mmc = &plat->mmc;
>> +	host->mmc->dev = dev;
>>
>>  	ret = sdhci_setup_cfg(&plat->cfg, host, 50000000, 400000);
>>  	if (ret)
>>  		return ret;
>>
>> -	host->mmc = &plat->mmc;
>>  	host->mmc->priv = host;
> Should this line also be moved?

Currently this field is not needed in sdhci_setup_cfg(), but ok, i will move it also

if it can avoid issue in the future.

Thanks

Patrice


>
> Regards,
> Peng
>
>> -	host->mmc->dev = dev;
>>  	upriv->mmc = host->mmc;
>>
>>  	return sdhci_probe(dev);
>> --
>> 2.17.1


More information about the U-Boot mailing list