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

Jaehoon Chung jh80.chung at samsung.com
Fri Sep 24 02:23:34 CEST 2021


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 at samsung.com>
---
 cmd/mmc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index f1e30d0cf64b..62c7e9129666 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -673,6 +673,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;
-- 
2.29.0



More information about the U-Boot mailing list