mmc: sdhci-of-esdhc: use 1/2 periperhal clock for ls1028a
authorYangbo Lu <yangbo.lu@nxp.com>
Fri, 14 Jun 2019 08:29:54 +0000 (16:29 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Jun 2019 11:33:54 +0000 (13:33 +0200)
LS1028A used 1/2 periperhal clock as one reference clock.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-esdhc.c

index c56c7d413a0935123efa88eec4890e8e2b3241ef..4dd43b1adf2cb70150319a6a680d35768ac33a33 100644 (file)
@@ -1048,11 +1048,12 @@ static void esdhc_init(struct platform_device *pdev, struct sdhci_host *host)
                /*
                 * esdhc->peripheral_clock would be assigned with a value
                 * which is eSDHC base clock when use periperal clock.
-                * For ls1046a, the clock value got by common clk API is
-                * peripheral clock while the eSDHC base clock is 1/2
-                * peripheral clock.
+                * For some platforms, the clock value got by common clk
+                * API is peripheral clock while the eSDHC base clock is
+                * 1/2 peripheral clock.
                 */
-               if (of_device_is_compatible(np, "fsl,ls1046a-esdhc"))
+               if (of_device_is_compatible(np, "fsl,ls1046a-esdhc") ||
+                   of_device_is_compatible(np, "fsl,ls1028a-esdhc"))
                        esdhc->peripheral_clock = clk_get_rate(clk) / 2;
                else
                        esdhc->peripheral_clock = clk_get_rate(clk);