diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 6bece7f307..c2c85ba144 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2998,6 +2998,30 @@ int mmc_initialize(bd_t *bis) return 0; } +#if CONFIG_IS_ENABLED(DM_MMC) +int mmc_init_device(int num) +{ + struct udevice *dev; + struct mmc *m; + int ret; + + ret = uclass_get_device(UCLASS_MMC, num, &dev); + if (ret) + return ret; + + m = mmc_get_mmc_dev(dev); + if (!m) + return 0; +#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT + mmc_set_preinit(m, 1); +#endif + if (m->preinit) + mmc_start_init(m); + + return 0; +} +#endif + #ifdef CONFIG_CMD_BKOPS_ENABLE int mmc_set_bkops_enable(struct mmc *mmc) { |