summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2020-09-01 11:58:00 +0300
committerPeng Fan <peng.fan@nxp.com>2020-10-12 10:45:40 +0300
commit1fdefd1d0d12ac728e29a67a224777299840a397 (patch)
treeae6948ea909c2bfc23ea6be8f81a69c0d4590d57 /drivers/mmc
parent390f9bddb9c84f75649024b41b8cf2a766379ce0 (diff)
downloadu-boot-1fdefd1d0d12ac728e29a67a224777299840a397.tar.xz
mmc: fsl_esdhc: add a reinit() callback
Add a reinit() callback for mmc rescan. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/fsl_esdhc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index de9fe01bc5..83feaf192b 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -907,6 +907,14 @@ static int fsl_esdhc_set_ios(struct udevice *dev)
return esdhc_set_ios_common(priv, &plat->mmc);
}
+static int fsl_esdhc_reinit(struct udevice *dev)
+{
+ struct fsl_esdhc_plat *plat = dev_get_platdata(dev);
+ struct fsl_esdhc_priv *priv = dev_get_priv(dev);
+
+ return esdhc_init_common(priv, &plat->mmc);
+}
+
static const struct dm_mmc_ops fsl_esdhc_ops = {
.get_cd = fsl_esdhc_get_cd,
.send_cmd = fsl_esdhc_send_cmd,
@@ -914,6 +922,7 @@ static const struct dm_mmc_ops fsl_esdhc_ops = {
#ifdef MMC_SUPPORTS_TUNING
.execute_tuning = fsl_esdhc_execute_tuning,
#endif
+ .reinit = fsl_esdhc_reinit,
};
static const struct udevice_id fsl_esdhc_ids[] = {