]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: use new hwpart API when CONFIG_BLK enabled
authorKever Yang <kever.yang@rock-chips.com>
Thu, 8 Jun 2017 01:20:03 +0000 (09:20 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 19 Jul 2017 10:13:59 +0000 (19:13 +0900)
When CONFIG_BLK is enabled, the hwpart id is different with legacy
interface, update it to kame driver work with CONFIG_BLK.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
cmd/mmc.c

index f83032ec4572b8c31f839945421772e46a5fbb9e..f7b75684adedc0673f03664aee63c1f71275bdc6 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -253,7 +253,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;