public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] cmd: mmc: print serial number
@ 2019-04-08 13:38 Christian Gmeiner
  2019-04-08 14:54 ` Ismael Luceno Cortes
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Gmeiner @ 2019-04-08 13:38 UTC (permalink / raw)
  To: u-boot

Might be useful to see the serial number.

v2: add missing \n.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 cmd/mmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index 8bc3648193..df7fa77f19 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -23,6 +23,7 @@ static void print_mmcinfo(struct mmc *mmc)
 	printf("Name: %c%c%c%c%c \n", mmc->cid[0] & 0xff,
 			(mmc->cid[1] >> 24), (mmc->cid[1] >> 16) & 0xff,
 			(mmc->cid[1] >> 8) & 0xff, mmc->cid[1] & 0xff);
+	printf("Serial Number: %08x", (mmc->cid[2] << 16) | (mmc->cid[3] >> 16));
 
 	printf("Bus Speed: %d\n", mmc->clock);
 #if CONFIG_IS_ENABLED(MMC_VERBOSE)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-08 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 13:38 [U-Boot] [PATCH v2] cmd: mmc: print serial number Christian Gmeiner
2019-04-08 14:54 ` Ismael Luceno Cortes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox