]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: mmc: check whether card is SD or eMMC before hwpartition
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 24 Sep 2021 00:23:34 +0000 (09:23 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 29 Oct 2021 09:22:32 +0000 (18:22 +0900)
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>
cmd/mmc.c

index 64e6be7280386918e017e67f5a66672640954e89..96d81ffdf3689603f17bf33b10ab1229544e34ad 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -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;