mmc: fsl_esdhc_imx: Fix clock disable issue
Subsystems (2)
PATCH 1/1 mmc: fsl_esdhc_imx: Fix clock disable issue
The SD clock disable is wrapped by MMC_SUPPORTS_TUNING. So it only works when UHS is enabled. However, in SD initialization the power cycle does not depends on UHS. But the power cycle needs disable the SD clock before power down.
So this causes a problem when UHS is not enabled. Some cards can't become ready (ACMD14 timeout) due to the clock is enabled during power cycle.
--- drivers/mmc/fsl_esdhc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/fsl_esdhc_imx.c +1 -1
@@ -971,7 +971,6 @@ static int esdhc_set_ios_common(struct fsl_esdhc_priv *priv, struct mmc *mmc)if (priv->clock != clock)set_sysctl (priv, mmc, clock); -#ifdef MMC_SUPPORTS_TUNING if (mmc->clk_disable) {#ifdef CONFIG_FSL_USDHC esdhc_clrbits32 (®s->vendorspec,VENDORSPEC_CKEN );
@@ -987,6 +986,7 @@ static int esdhc_set_ios_common(struct fsl_esdhc_priv *priv, struct mmc *mmc)#endif } +#ifdef MMC_SUPPORTS_TUNING /* * For HS400/HS400ES mode, make sure set the strobe dll in the * target clock rate. So call esdhc_set_strobe_dll() after the
Signature · 1 line
2.7.4
Quoted 10 lines · Ye Li
The SD clock disable is wrapped by
MMC_SUPPORTS_TUNING. So it only works when UHS is enabled. However, in SD initialization the power cycle does not depends on UHS. But the power cycle needs disable the SD clock before power down.
So this causes a problem when UHS is not enabled. Some cards can't become ready (ACMD14 timeout) due to the clock is enabled during power cycle.Signed-off-by Ye Li <[email protected]>Reviewed-by Haibo Chen <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 25 lines
--- drivers/mmc/fsl_esdhc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/fsl_esdhc_imx.c +1
-1@@ -971,7 +971,6 @@ static int esdhc_set_ios_common(struct fsl_esdhc_priv *priv, struct mmc *mmc)if (priv->clock != clock)set_sysctl (priv, mmc, clock); -#ifdef MMC_SUPPORTS_TUNING if (mmc->clk_disable) {#ifdef CONFIG_FSL_USDHC esdhc_clrbits32 (®s->vendorspec,VENDORSPEC_CKEN );@@ -987,6 +986,7 @@ static int esdhc_set_ios_common(struct fsl_esdhc_priv *priv, struct mmc *mmc)#endif } +#ifdef MMC_SUPPORTS_TUNING /* * For HS400/HS400ES mode, make sure set the strobe dll in the * target clock rate. So call esdhc_set_strobe_dll() after the
PATCH 1/1 mmc: fsl_esdhc_imx: Fix clock disable issue
In reply to Ye LiQuoted 10 lines
The SD clock disable is wrapped by
MMC_SUPPORTS_TUNING. So it only works when UHS is enabled. However, in SD initialization the power cycle does not depends on UHS. But the power cycle needs disable the SD clock before power down.
So this causes a problem when UHS is not enabled. Some cards can't become ready (ACMD14 timeout) due to the clock is enabled during power cycle.Signed-off-by Ye Li <[email protected]>Reviewed-by Haibo Chen <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>
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] =====================================================================