Re: [PATCH v3 1/7] mmc: sdhci_am654: Add tuning algorithm for delay chain

From: Adrian Hunter
Date: Tue Mar 19 2024 - 02:41:04 EST


On 18/03/24 16:04, Judith Mendez wrote:
> On 3/14/24 9:18 AM, Adrian Hunter wrote:
>> On 8/03/24 02:57, Judith Mendez wrote:
>>> @@ -290,10 +297,12 @@ static void sdhci_am654_set_clock(struct sdhci_host *host, unsigned int clock)
>>>         regmap_update_bits(sdhci_am654->base, PHY_CTRL4, mask, val);
>>>   -    if (timing > MMC_TIMING_UHS_SDR25 && clock >= CLOCK_TOO_SLOW_HZ)
>>> +    if (timing > MMC_TIMING_UHS_SDR25 && clock >= CLOCK_TOO_SLOW_HZ) {
>>>           sdhci_am654_setup_dll(host, clock);
>>> -    else
>>> +        sdhci_am654->dll_enable = true;
>>> +    } else {
>>>           sdhci_am654_setup_delay_chain(sdhci_am654, timing);
>>
>> V2 patch had here:
>>
>>         sdhci_am654->dll_enable = false;
>>
>> Was its removal intended?
>
> I did remove on purpose since it did not seem to be necessary.

I suspect it is necessary because ->set_clock() can be called in
when the timing has changed (e.g. recovery resets and reinitializes
the card device, or the card changes etc.) but it seems like
dll_enable would be stuck as always true once it is set to true.