]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: fsl_esdhc: fix problem when using clk driver
authorYe Li <ye.li@nxp.com>
Fri, 23 Sep 2022 22:29:33 +0000 (00:29 +0200)
committerStefano Babic <sbabic@denx.de>
Fri, 21 Oct 2022 09:54:13 +0000 (11:54 +0200)
Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties
will initialize the clocks by clk driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/fsl_esdhc_imx.c

index 9befb190bdf91873ea2b78e34b2fc7f1f0f98e6a..92b152fc97942224c70ec3f00b5bdd7c3574ef82 100644 (file)
@@ -1519,8 +1519,6 @@ static int fsl_esdhc_probe(struct udevice *dev)
         * work as expected.
         */
 
-       init_clk_usdhc(dev_seq(dev));
-
 #if CONFIG_IS_ENABLED(CLK)
        /* Assigned clock already set clock */
        ret = clk_get_by_name(dev, "per", &priv->per_clk);
@@ -1536,6 +1534,8 @@ static int fsl_esdhc_probe(struct udevice *dev)
 
        priv->sdhc_clk = clk_get_rate(&priv->per_clk);
 #else
+       init_clk_usdhc(dev_seq(dev));
+
        priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev));
        if (priv->sdhc_clk <= 0) {
                dev_err(dev, "Unable to get clk for %s\n", dev->name);