[PATCH] cmd: mmc: check whether card is SD or eMMC before hwpartition
Peng Fan (OSS)
peng.fan at oss.nxp.com
Fri Sep 24 04:37:18 CEST 2021
On 2021/9/24 8:23, Jaehoon Chung wrote:
> 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;
>
Reviewed-by: Peng Fan <peng.fan at nxp.com>
More information about the U-Boot
mailing list