From be51cba531a985f6bde70213856ee957b80562dd Mon Sep 17 00:00:00 2001 From: Ye Li Date: Thu, 25 Apr 2019 18:39:12 -0700 Subject: [PATCH] MLK-21848-5 fsl_esdhc: fix problem when using clk driver Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will check the CONFIG_SPL_CLK when building SPL 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 --- drivers/mmc/fsl_esdhc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 850ffc2088..33ca66dd3c 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -1558,9 +1558,7 @@ static int fsl_esdhc_probe(struct udevice *dev) * work as expected. */ - init_clk_usdhc(dev->seq); - - if (IS_ENABLED(CONFIG_CLK)) { + if (CONFIG_IS_ENABLED(CLK)) { /* Assigned clock already set clock */ ret = clk_get_by_name(dev, "per", &priv->per_clk); if (ret) { @@ -1575,6 +1573,8 @@ static int fsl_esdhc_probe(struct udevice *dev) priv->sdhc_clk = clk_get_rate(&priv->per_clk); } else { + init_clk_usdhc(dev->seq); + priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq); if (priv->sdhc_clk <= 0) { dev_err(dev, "Unable to get clk for %s\n", dev->name); -- 2.17.1