]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mmc: print SD/eMMC type for inited mmc devices
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Fri, 20 Feb 2015 11:29:27 +0000 (12:29 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:53:57 +0000 (13:53 +0200)
Depending on the boot priority, the eMMC/SD cards,
can be initialized with the same numbers for each boot.

To be sure which mmc device is SD and which is eMMC,
this info is printed by 'mmc list' command, when
the init is done.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
drivers/mmc/mmc.c

index c0bab82714c50f2649af8095077464b3b5741423..65efff28dbacae6d82ddc42dec81c2a27975c77c 100644 (file)
@@ -1698,11 +1698,19 @@ void print_mmc_devices(char separator)
 {
        struct mmc *m;
        struct list_head *entry;
+       char *mmc_type;
 
        list_for_each(entry, &mmc_devices) {
                m = list_entry(entry, struct mmc, link);
 
+               if (m->has_init)
+                       mmc_type = IS_SD(m) ? "SD" : "eMMC";
+               else
+                       mmc_type = NULL;
+
                printf("%s: %d", m->cfg->name, m->block_dev.dev);
+               if (mmc_type)
+                       printf(" (%s)", mmc_type);
 
                if (entry->next != &mmc_devices) {
                        printf("%c", separator);