[PATCH 3/3] mmc: fsl_esdhc_imx: add ColdFire support

Angelo Dureghello angelo.dureghello at timesys.com
Fri Feb 24 01:52:10 CET 2023


From: Angelo Durgehello <angelo at kernel-space.org>

ColdFire mcf5441x includes the same imx esdhc controller module,
so adding minimal code to support it.

Signed-off-by: Angelo Durgehello <angelo at kernel-space.org>
---
 drivers/mmc/fsl_esdhc_imx.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 66caf683f7..4e15738782 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1381,7 +1381,9 @@ void fdt_fixup_esdhc(void *blob, struct bd_info *bd)
 #endif
 
 #if CONFIG_IS_ENABLED(DM_MMC)
+#if !CONFIG_IS_ENABLED(MCF5441x)
 #include <asm/arch/clock.h>
+#endif
 __weak void init_clk_usdhc(u32 index)
 {
 }
@@ -1536,7 +1538,12 @@ static int fsl_esdhc_probe(struct udevice *dev)
 #else
 	init_clk_usdhc(dev_seq(dev));
 
+#if IS_ENABLED(CONFIG_MCF5441x)
+	priv->sdhc_clk = gd->arch.sdhc_clk;
+#else
 	priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev));
+#endif
+
 	if (priv->sdhc_clk <= 0) {
 		dev_err(dev, "Unable to get clk for %s\n", dev->name);
 		return -EINVAL;
-- 
2.39.1



More information about the U-Boot mailing list