aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2022-03-08 20:36:41 +0900
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-04-09 21:06:31 +0200
commitc822c1a50bd7573c57ba70a2b52590a7954960fc (patch)
treed245d8da30c6d15ed2bab68f212dd517a6a2392d /drivers/mmc
parent8c9812a5d557c4eacf164147d7380b3af1b222ec (diff)
downloadu-boot-c822c1a50bd7573c57ba70a2b52590a7954960fc.zip
u-boot-c822c1a50bd7573c57ba70a2b52590a7954960fc.tar.gz
u-boot-c822c1a50bd7573c57ba70a2b52590a7954960fc.tar.bz2
mmc: call device_probe() after scanning
Every time a mmc bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc-uclass.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index b80e838..57da788 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -467,6 +467,18 @@ static int mmc_blk_probe(struct udevice *dev)
return ret;
}
+ ret = device_probe(dev);
+ if (ret) {
+ debug("Probing %s failed (err=%d)\n", dev->name, ret);
+
+ if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) ||
+ CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) ||
+ CONFIG_IS_ENABLED(MMC_HS400_SUPPORT))
+ mmc_deinit(mmc);
+
+ return ret;
+ }
+
return 0;
}