dm: mmc: Use the new select_hwpart() API
Avoid calling directly into the MMC code - use the new API call instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/common/env_mmc.c b/common/env_mmc.c
index bdb452e..c7fef18 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -86,8 +86,8 @@
dev = 0;
#endif
- env_mmc_orig_hwpart = mmc->block_dev.hwpart;
- ret = mmc_select_hwpart(dev, part);
+ env_mmc_orig_hwpart = mmc_get_blk_desc(mmc)->hwpart;
+ ret = blk_select_hwpart_devnum(IF_TYPE_MMC, dev, part);
if (ret)
puts("MMC partition switch failed\n");
@@ -119,7 +119,7 @@
#ifdef CONFIG_SPL_BUILD
dev = 0;
#endif
- mmc_select_hwpart(dev, env_mmc_orig_hwpart);
+ blk_select_hwpart_devnum(IF_TYPE_MMC, dev, env_mmc_orig_hwpart);
#endif
}
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 8d588d1..cf527da 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -296,7 +296,7 @@
if (part == 7)
part = 0;
- err = mmc_switch_part(0, part);
+ err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
if (err) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("spl: mmc partition switch failed\n");