cmd: mmc: check whether card is SD or eMMC before hwpartition

It doesn't need to follow more sequence to do the hwparititioning,
because SD doesn't support hwpartitioning feature.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
Jaehoon Chung 2021-09-24 09:23:34 +09:00
parent f702dc1e1f
commit 0d453c84ba

View file

@ -698,6 +698,11 @@ static int do_mmc_hwpartition(struct cmd_tbl *cmdtp, int flag,
if (!mmc)
return CMD_RET_FAILURE;
if (IS_SD(mmc)) {
puts("SD doesn't support partitioning\n");
return CMD_RET_FAILURE;
}
if (argc < 1)
return CMD_RET_USAGE;
i = 1;