summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc-uclass.c
diff options
context:
space:
mode:
authorFaiz Abbas <faiz_abbas@ti.com>2020-02-26 13:44:30 +0530
committerPeng Fan <peng.fan@nxp.com>2020-03-09 08:33:15 +0800
commit32860bdbc1f2d4133c1ef38685c6b02368136fbb (patch)
tree19a1f95a352def35d79a151c6c8577cc3e361af4 /drivers/mmc/mmc-uclass.c
parent0d3c8584885a7c76929bfa59fa34e44a2134ae1f (diff)
mmc: Add a deferred_probe() API
Add a deferred_probe() API for platforms that want to do some configurations just before starting to enumerate the device. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r--drivers/mmc/mmc-uclass.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 0b90a97650..c75892a72c 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -138,6 +138,21 @@ int mmc_host_power_cycle(struct mmc *mmc)
return dm_mmc_host_power_cycle(mmc->dev);
}
+int dm_mmc_deferred_probe(struct udevice *dev)
+{
+ struct dm_mmc_ops *ops = mmc_get_ops(dev);
+
+ if (ops->deferred_probe)
+ return ops->deferred_probe(dev);
+
+ return 0;
+}
+
+int mmc_deferred_probe(struct mmc *mmc)
+{
+ return dm_mmc_deferred_probe(mmc->dev);
+}
+
int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
{
int val;