mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 20:04:46 +00:00
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>
This commit is contained in:
parent
8c9812a5d5
commit
c822c1a50b
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue