]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mmc: sdhci-msm: Override DLL_CONFIG only if the valid value is supplied
authorVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Wed, 8 Jul 2020 13:11:19 +0000 (18:41 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 8 Jul 2020 13:30:35 +0000 (15:30 +0200)
During DLL initialization, the DLL_CONFIG register value would be
updated with the value supplied from the device-tree.

Override this register only if a valid value is supplied.

Fixes: ee2843cb5567 ("mmc: sdhci-msm: Read and use DLL Config property from device tree file")
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
Link: https://lore.kernel.org/r/1594213888-2780-1-git-send-email-vbadigan@codeaurora.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-msm.c

index b277dd7fbdb5d56e7520d36491e3981378b5a42b..c0d58e9fcc33365a746bc005f601021e5cb69989 100644 (file)
@@ -618,8 +618,9 @@ static int msm_init_cm_dll(struct sdhci_host *host)
        config &= ~CORE_CLK_PWRSAVE;
        writel_relaxed(config, host->ioaddr + msm_offset->core_vendor_spec);
 
-       config = msm_host->dll_config;
-       writel_relaxed(config, host->ioaddr + msm_offset->core_dll_config);
+       if (msm_host->dll_config)
+               writel_relaxed(msm_host->dll_config,
+                               host->ioaddr + msm_offset->core_dll_config);
 
        if (msm_host->use_14lpp_dll_reset) {
                config = readl_relaxed(host->ioaddr +