The eMMC spec numbers general purpose partitions starting at 1, but
the mmcinfo output follows the internal numbering which starts at 0.
Make the mmcinfo command output number partitions as in the eMMC
spec to avoid confusion.

Signed-off-by: Diego Santa Cruz <diego.santac...@spinetix.com>
---
 common/cmd_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 18cfe09..10315b8 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -109,7 +109,7 @@ static void print_mmcinfo(struct mmc *mmc)
                        bool is_enh = has_enh &&
                                (mmc->part_attr & EXT_CSD_ENH_GP(i));
                        if (mmc->capacity_gp[i]) {
-                               printf("GP%i Capacity: ", i);
+                               printf("GP%i Capacity: ", i+1);
                                print_size(mmc->capacity_gp[i],
                                           is_enh ? " ENH\n" : "\n");
                        }
-- 
2.2.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to