Hi,

On 11/1/21 9:16 PM, Alper Nebi Yasak wrote:
> On 01/11/2021 14:18, Jack Mitchell wrote:
>> On 01/11/2021 09:07, Alper Nebi Yasak wrote:
>>> I'm trying to make my gru-kevin's eMMC work properly (it times out while
>>> tuning for HS400 and stops working when reinitialized via "mmc dev 0").
>>
>> I'm also experiencing issue with the re-init of emmc on a 3399 platform,
>> did you come to any conclusions on the reason? It works fine to load
>> u-boot proper from SPL but then fails in u-boot proper when attempting
>> to perform any mmc activity.
> 
> Not really. But I have a nice hack to keep it in a working state:
> 
> diff --git a/cmd/mmc.c b/cmd/mmc.c
> index 96d81ffdf368..83bd18e34609 100644
> --- a/cmd/mmc.c
> +++ b/cmd/mmc.c
> @@ -129,10 +129,13 @@ static struct mmc *__init_mmc_device(...)
>       if (!mmc) {
>               printf("no mmc device at slot %x\n", dev);
>               return NULL;
>       }
> 
> +     if (mmc->cfg->host_caps & MMC_CAP_NONREMOVABLE)
> +             force_init = false;
> +

I don't have rockchip board, but this code is working fine.
It seems that needs to implement a reinit callback function to clear the 
previous configurations in rockchip_sdhci.c.

Best Regards,
Jaehoon Chung

>       if (!mmc_getcd(mmc))
>               force_init = true;
> 
>       if (force_init)
>               mmc->has_init = 0;
> 

Reply via email to