All of lore.kernel.org
 help / color / mirror / Atom feed
From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 2/2] mmc: print SD/eMMC type for inited mmc devices
Date: Fri, 20 Feb 2015 12:29:27 +0100	[thread overview]
Message-ID: <1424431767-15321-3-git-send-email-p.marczak@samsung.com> (raw)
In-Reply-To: <1424431767-15321-1-git-send-email-p.marczak@samsung.com>

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>

---
Changes v2:
- none

Changes v3:
- Fix email to Pantelis
---
 drivers/mmc/mmc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index b8039cd..a13769e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1693,11 +1693,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);
-- 
1.9.1

  parent reply	other threads:[~2015-02-20 11:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 13:09 [U-Boot] [PATCH 0/4] exynos-dwmmc: check set init priority for boot channel Przemyslaw Marczak
2015-02-17 13:09 ` [U-Boot] [PATCH 1/4] dm: gpio: extend gpio api by dm_gpio_set_pull() Przemyslaw Marczak
2015-02-18  5:01   ` Simon Glass
2015-02-18 10:49     ` Przemyslaw Marczak
2015-02-18 16:39     ` Stephen Warren
2015-02-19 12:11       ` Przemyslaw Marczak
2015-02-19 17:09         ` Stephen Warren
2015-02-20  9:34           ` Przemyslaw Marczak
2015-02-20 17:50             ` Stephen Warren
2015-02-20 19:29               ` Simon Glass
2015-02-23 10:51                 ` Przemyslaw Marczak
2015-02-23 15:30                   ` Simon Glass
2015-02-23 16:56                     ` Przemyslaw Marczak
2015-02-23 17:50                       ` Simon Glass
2015-02-24  9:44                         ` Przemyslaw Marczak
2015-02-23 10:21               ` Przemyslaw Marczak
2015-02-17 13:09 ` [U-Boot] [PATCH 2/4] s5p: gpio: add implementation of dm_gpio_set_pull() Przemyslaw Marczak
2015-02-17 13:09 ` [U-Boot] [PATCH 3/4] mmc: exynos dwmmc: check boot mode before init dwmmc Przemyslaw Marczak
2015-02-18  5:02   ` Simon Glass
2015-02-18 10:50     ` Przemyslaw Marczak
2015-02-19 14:03       ` Tom Rini
2015-02-19 14:36         ` Przemyslaw Marczak
2015-02-19 16:45           ` Tom Rini
2015-02-20  9:36             ` Przemyslaw Marczak
2015-02-19 14:01     ` Tom Rini
2015-02-17 13:09 ` [U-Boot] [PATCH 4/4] mmc: print SD/eMMC type for inited mmc devices Przemyslaw Marczak
2015-02-18 10:51 ` [U-Boot] [PATCH V2 0/4] exynos-dwmmc: check set init priority for boot channel Przemyslaw Marczak
2015-02-18 10:51   ` [U-Boot] [PATCH V2 1/4] dm: gpio: extend gpio api by dm_gpio_set_pull() Przemyslaw Marczak
2015-02-18 10:51   ` [U-Boot] [PATCH V2 2/4] s5p: gpio: add implementation of dm_gpio_set_pull() Przemyslaw Marczak
2015-02-18 10:51   ` [U-Boot] [PATCH V2 3/4] mmc: exynos dwmmc: check boot mode before init dwmmc Przemyslaw Marczak
2015-02-18 10:51   ` [U-Boot] [PATCH V2 4/4] mmc: print SD/eMMC type for inited mmc devices Przemyslaw Marczak
2015-02-20 11:29 ` [U-Boot] [PATCH V3 0/2] exynos-dwmmc: set init priority for boot channel Przemyslaw Marczak
2015-02-20 11:29   ` [U-Boot] [PATCH V3 1/2] mmc: exynos dwmmc: check boot mode before init dwmmc Przemyslaw Marczak
2015-02-23 17:49     ` Pantelis Antoniou
2015-02-20 11:29   ` Przemyslaw Marczak [this message]
2015-02-23 17:50     ` [U-Boot] [PATCH V3 2/2] mmc: print SD/eMMC type for inited mmc devices Pantelis Antoniou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424431767-15321-3-git-send-email-p.marczak@samsung.com \
    --to=p.marczak@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.