Skip to contentSkip to conversation

mmc: fsl_esdhc: fix problem when using clk driver

PATCH In review Marek Vasut 3 participants 3 messages Sep 23, 2022 – Oct 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: fsl_esdhc: fix problem when using clk driver

From: Ye Li <[email protected]>

Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties will initialize the clocks by clk driver.

---
NOTE: Was MLK-21848-5 fsl_esdhc: fix problem when using clk driver
NOTE: Fixes SD SDR104 mode instability on MX8MP
---
Cc: Fabio Estevam <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Max Krummenacher <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>

---
 drivers/mmc/fsl_esdhc_imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/fsl_esdhc_imx.c +2 -2
index 9befb190bdf..92b152fc979 100644
@@ -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);
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Marek Vasut

From: Ye Li <[email protected]>

Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties will initialize the clocks by clk driver.

Best Regards,
Jaehoon Chung

Quoted 36 lines

---
NOTE: Was MLK-21848-5 fsl_esdhc: fix problem when using clk driver
NOTE: Fixes SD SDR104 mode instability on MX8MP
---
Cc: Fabio Estevam <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Max Krummenacher <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Stefano Babic <[email protected]>

---
 drivers/mmc/fsl_esdhc_imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/fsl_esdhc_imx.c +2 -2
index 9befb190bdf..92b152fc979 100644
@@ -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 lore raw

PATCH 1/1 mmc: fsl_esdhc: fix problem when using clk driver

In reply to Marek Vasut
Quoted 6 lines

From: Ye Li <[email protected]>
Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties will initialize the clocks by clk driver.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================