]> git.sur5r.net Git - u-boot/commitdiff
mmc: make eMMC general purpose partition numbering match spec
authorDiego Santa Cruz <Diego.SantaCruz@spinetix.com>
Tue, 23 Dec 2014 09:50:18 +0000 (10:50 +0100)
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>
Mon, 19 Jan 2015 15:01:46 +0000 (17:01 +0200)
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.SantaCruz@spinetix.com>
common/cmd_mmc.c

index d95cfaa4f8e1302b0c2c1ea50017c4e10a3ee6bb..0e097c78e5d40e5f3cb7ccc762779d1c2d1755ea 100644 (file)
@@ -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");
                        }