summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-05-26 12:27:10 +0300
committerKever Yang <kever.yang@rock-chips.com>2017-07-21 05:28:51 +0300
commitd2842e85c5c282d075958598d634fefb5185d6ca (patch)
tree74aaa691b0685013733d535f03672e1241765a5d
parent32e4abf6985ac7d666593adb44a8d7999c55f0c6 (diff)
downloadu-boot-d2842e85c5c282d075958598d634fefb5185d6ca.tar.xz
mmc: use new hwpart API when CONFIG_BLK enabled
When CONFIG_BLK is enabled, the hwpart id is different with legacy interface, update it to kame driver work with CONFIG_BLK. Change-Id: I581c2da9573e4a61dffc2031131e668127b97b9a Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--cmd/mmc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 832eeb07dc..c0ff49ae5d 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -258,7 +258,11 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
}
/* Switch to the RPMB partition */
+#ifndef CONFIG_BLK
original_part = mmc->block_dev.hwpart;
+#else
+ original_part = mmc_get_blk_desc(mmc)->hwpart;
+#endif
if (blk_select_hwpart_devnum(IF_TYPE_MMC, curr_device, MMC_PART_RPMB) !=
0)
return CMD_RET_FAILURE;