Skip to content
Snippets Groups Projects
Commit 97525647 authored by Simon Glass's avatar Simon Glass Committed by Jaehoon Chung
Browse files

dm: mmc: Avoid probing block devices in find_mmc_device()


We do not need to probe the block device here, so avoid doing so. The MMC
device itself must be active, but the block device can come later.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 01b73fe6
No related branches found
No related tags found
No related merge requests found
...@@ -97,7 +97,7 @@ struct mmc *find_mmc_device(int dev_num) ...@@ -97,7 +97,7 @@ struct mmc *find_mmc_device(int dev_num)
struct udevice *dev, *mmc_dev; struct udevice *dev, *mmc_dev;
int ret; int ret;
ret = blk_get_device(IF_TYPE_MMC, dev_num, &dev); ret = blk_find_device(IF_TYPE_MMC, dev_num, &dev);
if (ret) { if (ret) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) #if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
...@@ -108,7 +108,9 @@ struct mmc *find_mmc_device(int dev_num) ...@@ -108,7 +108,9 @@ struct mmc *find_mmc_device(int dev_num)
mmc_dev = dev_get_parent(dev); mmc_dev = dev_get_parent(dev);
return mmc_get_mmc_dev(mmc_dev); struct mmc *mmc = mmc_get_mmc_dev(mmc_dev);
return mmc;
} }
int get_mmc_num(void) int get_mmc_num(void)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment