diff mbox series

[U-Boot] drivers: mmc: fsl_esdhc_imx: add m68k support

Message ID 20191123225506.385133-1-angelo.dureghello@timesys.com
State Deferred
Delegated to: Peng Fan
Headers show
Series [U-Boot] drivers: mmc: fsl_esdhc_imx: add m68k support | expand

Commit Message

Angelo Dureghello Nov. 23, 2019, 10:55 p.m. UTC
From: Angelo Durgehello <angelo.dureghello@timesys.com>

Add DM m68k support.

Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
---
 drivers/mmc/fsl_esdhc_imx.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 4099386313..4437ed82ae 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1398,7 +1398,9 @@  void fdt_fixup_esdhc(void *blob, bd_t *bd)
 #endif
 
 #if CONFIG_IS_ENABLED(DM_MMC)
+#ifndef CONFIG_MCF5441x
 #include <asm/arch/clock.h>
+#endif
 __weak void init_clk_usdhc(u32 index)
 {
 }
@@ -1528,7 +1530,11 @@  static int fsl_esdhc_probe(struct udevice *dev)
 
 		priv->sdhc_clk = clk_get_rate(&priv->per_clk);
 	} else {
+#ifndef CONFIG_MCF5441x
 		priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
+#else
+		priv->sdhc_clk = gd->arch.sdhc_clk;
+#endif
 		if (priv->sdhc_clk <= 0) {
 			dev_err(dev, "Unable to get clk for %s\n", dev->name);
 			return -EINVAL;