diff options
author | Faiz Abbas <faiz_abbas@ti.com> | 2020-02-26 13:44:31 +0530 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-03-09 08:33:16 +0800 |
commit | cb884347f4f902b605932da1d45d477d10c144e3 (patch) | |
tree | d50b20f834650f2fb2a32ccb95a22b9f708e1976 /drivers | |
parent | 32860bdbc1f2d4133c1ef38685c6b02368136fbb (diff) |
sdhci: Add sdhci_deferred_probe() API
Add the sdhci_deferred_probe() function to register as the
deferred_probe() callback to the mmc core. It will in turn call the
deferred_probe() callback of the platform drivers as declared in the
sdhci_ops.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/sdhci.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 9b7c5f8f68..520c9f9feb 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -658,6 +658,20 @@ int sdhci_probe(struct udevice *dev) return sdhci_init(mmc); } +static int sdhci_deferred_probe(struct udevice *dev) +{ + int err; + struct mmc *mmc = mmc_get_mmc_dev(dev); + struct sdhci_host *host = mmc->priv; + + if (host->ops && host->ops->deferred_probe) { + err = host->ops->deferred_probe(host); + if (err) + return err; + } + return 0; +} + static int sdhci_get_cd(struct udevice *dev) { struct mmc *mmc = mmc_get_mmc_dev(dev); @@ -692,6 +706,7 @@ const struct dm_mmc_ops sdhci_ops = { .send_cmd = sdhci_send_command, .set_ios = sdhci_set_ios, .get_cd = sdhci_get_cd, + .deferred_probe = sdhci_deferred_probe, #ifdef MMC_SUPPORTS_TUNING .execute_tuning = sdhci_execute_tuning, #endif |