public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] mmc: fsl_esdhc: fix problem when using clk driver
@ 2022-09-23 22:29 Marek Vasut
  2022-10-07 12:37 ` Jaehoon Chung
  2022-10-21 11:42 ` sbabic
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2022-09-23 22:29 UTC (permalink / raw)
  To: u-boot
  Cc: Ye Li, Marek Vasut, Fabio Estevam, Jaehoon Chung, Marcel Ziswiler,
	Max Krummenacher, Peng Fan, Stefano Babic

From: Ye Li <ye.li@nxp.com>

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>
---
NOTE: Was MLK-21848-5 fsl_esdhc: fix problem when using clk driver
NOTE: Fixes SD SDR104 mode instability on MX8MP
---
Cc: Fabio Estevam <festevam@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 drivers/mmc/fsl_esdhc_imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 9befb190bdf..92b152fc979 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -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);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-21 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 22:29 [PATCH] mmc: fsl_esdhc: fix problem when using clk driver Marek Vasut
2022-10-07 12:37 ` Jaehoon Chung
2022-10-21 11:42 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox