summaryrefslogtreecommitdiff
path: root/cmd/mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 13:52:29 -0600
committerSimon Glass <sjg@chromium.org>2016-05-17 09:54:43 -0600
commit69f45cd53b8ad8bc3afef2cf2410baf58fe75a6f (patch)
treea0272956d8da3a10f70ed60da94becfdf6c92f8f /cmd/mmc.c
parent0776167ec5541a2b4fa099dfea5a1aad2d4b7c72 (diff)
downloadu-boot-69f45cd53b8ad8bc3afef2cf2410baf58fe75a6f.tar.gz
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>
Diffstat (limited to 'cmd/mmc.c')
-rw-r--r--cmd/mmc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 4f251870ee..8695c19187 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -314,12 +314,14 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
}
/* Switch to the RPMB partition */
original_part = mmc->block_dev.hwpart;
- if (mmc_select_hwpart(curr_device, MMC_PART_RPMB) != 0)
+ if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, MMC_PART_RPMB) !=
+ 0)
return CMD_RET_FAILURE;
ret = cp->cmd(cmdtp, flag, argc, argv);
/* Return to original partition */
- if (mmc_select_hwpart(curr_device, original_part) != 0)
+ if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, original_part) !=
+ 0)
return CMD_RET_FAILURE;
return ret;
}
@@ -467,7 +469,7 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
if (!mmc)
return CMD_RET_FAILURE;
- ret = mmc_select_hwpart(dev, part);
+ ret = blk_select_hwpart_devnum(IF_TYPE_MMC, dev, part);
printf("switch to partitions #%d, %s\n",
part, (!ret) ? "OK" : "ERROR");
if (ret)