Re: [PATCH 3/3] mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver

From: Faiz Abbas
Date: Mon Dec 10 2018 - 07:02:01 EST


Hi Adrian,

On 07/12/18 7:02 PM, Adrian Hunter wrote:
> On 5/12/18 5:07 PM, Faiz Abbas wrote:
>> Hi Adrian,
>>
>> On 05/12/18 7:12 PM, Adrian Hunter wrote:
>>> On 29/11/18 6:15 PM, Faiz Abbas wrote:
>>>> The host controllers on TI's AM654 SOCs are not compatible with
>>>> the phy and consumer model of the sdhci-of-arasan driver. It turns out
>>>> that for optimal operation at higher speeds, a special tuning procedure
>>>> needs to be implemented which involves configuration of platform
>>>> specific phy registers.
>>>>
>>>> Therefore, branch out to a new sdhci_am654 driver and add the phy
>>>> register space with all phy configurations to it. Populate AM654
>>>> specific callbacks to sdhci_ops and add SDHCI_QUIRKS wherever
>>>> applicable.
>>>>
>>>> Only add support for upto High Speed for SD card and upto DDR52 speed
>>>> mode for eMMC. Higher speeds will be added in subsequent patches.
>>>>
...
>>>> +
>>>> + sdhci_am654->clk_ahb = devm_clk_get(dev, "clk_ahb");
>>>> + if (IS_ERR(sdhci_am654->clk_ahb)) {
>>>> + dev_err(dev, "clk_ahb clock not found.\n");
>>>> + ret = PTR_ERR(sdhci_am654->clk_ahb);
>>>> + goto err_pltfm_free;
>>>> + }
>>>
>>> Did you intend not to enable clks?
>>
>> Yes. Clocks get enabled as a part of pm_runtime calls.
>
> Ok, but that could use an explanatory comment. Also why get a reference to
> clk_ahb if that reference is never used?
>

You're right. It was being used in sdhci-of-arasan because other users
needed to call enable() and disable(). I missed out on removing it when
porting over. Will remove it and add the comment.

Thanks,
Faiz