mmc: fsl_esdhc_imx: add wait_dat0() support
Subsystems (2)
PATCH v2 1/1 mmc: fsl_esdhc_imx: add wait_dat0() support
From: Haibo Chen <[email protected]>
Add wait_dat0() support, upper layer will use this callback.
Signed-off-by Haibo Chen <[email protected]>
--- drivers/mmc/fsl_esdhc_imx.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/mmc/fsl_esdhc_imx.c +15 -0
@@ -1646,6 +1646,20 @@ static int fsl_esdhc_set_enhanced_strobe(struct udevice *dev) }#endif +static int fsl_esdhc_wait_dat0 (struct udevice *dev,int state, +int timeout_us) +{ +int ret; +u32 tmp; +struct fsl_esdhc_priv *priv =dev_get_priv (dev); +struct fsl_esdhc *regs = priv->esdhc_regs; + + ret =readx_poll_timeout (esdhc_read32, ®s->prsstat, tmp, + !!(tmp &PRSSTAT_DAT0 ) == !!state, + timeout_us); +return ret; +} +static const struct dm_mmc_ops fsl_esdhc_ops = { .get_cd = fsl_esdhc_get_cd, .send_cmd = fsl_esdhc_send_cmd,
@@ -1656,6 +1670,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = {#if CONFIG_IS_ENABLED (MMC_HS400_ES_SUPPORT ) .set_enhanced_strobe = fsl_esdhc_set_enhanced_strobe, #endif + .wait_dat0 = fsl_esdhc_wait_dat0, };#endif
Signature · 1 line
2.17.1
PATCH v2 1/1 mmc: fsl_esdhc_imx: add wait_dat0() support
Dear Haibo,
Quoted 5 lines · haibo.chen at nxp.com
From: Haibo Chen <[email protected]>
Add
wait_dat0()support, upper layer will use this callback.Signed-off-by Haibo Chen <[email protected]>
Reviewed-by Jaehoon Chung <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 38 lines
--- drivers/mmc/fsl_esdhc_imx.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/mmc/fsl_esdhc_imx.c +15
-0@@ -1646,6 +1646,20 @@ static int fsl_esdhc_set_enhanced_strobe(struct udevice *dev) }#endif +static int fsl_esdhc_wait_dat0 (struct udevice *dev,int state, +int timeout_us) +{ +int ret; +u32 tmp; +struct fsl_esdhc_priv *priv =dev_get_priv (dev); +struct fsl_esdhc *regs = priv->esdhc_regs; + + ret =readx_poll_timeout (esdhc_read32, ®s->prsstat, tmp, + !!(tmp &PRSSTAT_DAT0 ) == !!state, + timeout_us); +return ret; +} +static const struct dm_mmc_ops fsl_esdhc_ops = { .get_cd = fsl_esdhc_get_cd, .send_cmd = fsl_esdhc_send_cmd,@@ -1656,6 +1670,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = {#if CONFIG_IS_ENABLED (MMC_HS400_ES_SUPPORT ) .set_enhanced_strobe = fsl_esdhc_set_enhanced_strobe, #endif + .wait_dat0 = fsl_esdhc_wait_dat0, };#endif
PATCH v2 1/1 mmc: fsl_esdhc_imx: add wait_dat0() support
In reply to haibo.chen at nxp.comQuoted 4 lines
From: Haibo Chen <[email protected]>
Addwait_dat0()support, upper layer will use this callback.Signed-off-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: sbabic at denx.de =====================================================================