]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_mmc.c
mmc: extend mmcinfo to show enhanced partition attribute
[karo-tx-uboot.git] / common / cmd_mmc.c
index cdcbf5f80f9be5b718a52ecefeccc6796ccfbb07..d95cfaa4f8e1302b0c2c1ea50017c4e10a3ee6bb 100644 (file)
@@ -96,16 +96,22 @@ static void print_mmcinfo(struct mmc *mmc)
                        mmc->ddr_mode ? " DDR" : "");
 
        if (!IS_SD(mmc) && mmc->version >= MMC_VERSION_4) {
+               bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0;
                puts("User Capacity: ");
-               print_size(mmc->capacity_user, "\n");
+               print_size(mmc->capacity_user,
+                          has_enh && (mmc->part_attr & EXT_CSD_ENH_USR) ?
+                          " ENH\n" : "\n");
                puts("Boot Capacity: ");
-               print_size(mmc->capacity_boot, "\n");
+               print_size(mmc->capacity_boot, has_enh ? " ENH\n" : "\n");
                puts("RPMB Capacity: ");
-               print_size(mmc->capacity_rpmb, "\n");
+               print_size(mmc->capacity_rpmb, has_enh ? " ENH\n" : "\n");
                for (i = 0; i < ARRAY_SIZE(mmc->capacity_gp); i++) {
+                       bool is_enh = has_enh &&
+                               (mmc->part_attr & EXT_CSD_ENH_GP(i));
                        if (mmc->capacity_gp[i]) {
                                printf("GP%i Capacity: ", i);
-                               print_size(mmc->capacity_gp[i], "\n");
+                               print_size(mmc->capacity_gp[i],
+                                          is_enh ? " ENH\n" : "\n");
                        }
                }
        }