diff mbox

[U-Boot,V3,2/2] mmc: print SD/eMMC type for inited mmc devices

Message ID 1424431767-15321-3-git-send-email-p.marczak@samsung.com
State Accepted
Delegated to: Pantelis Antoniou
Headers show

Commit Message

Przemyslaw Marczak Feb. 20, 2015, 11:29 a.m. UTC
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(+)

Comments

Pantelis Antoniou Feb. 23, 2015, 5:50 p.m. UTC | #1
Hi Przemyslaw,

> On Feb 20, 2015, at 13:29 , Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> 
> 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
> 

Applied, thanks

— Pantelis
diff mbox

Patch

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);