[U-Boot-Users] [PATCH 1/1] mmc_verbosity variable
Antonio R. Costa
costa.antonior at gmail.com
Thu Jun 12 16:16:43 CEST 2008
Proposal for environment variable mmc_verbosity
to control verbosity levels in mmc code
Signed-off-by: Antonio R. Costa <antonio.costa at atmel.com>
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 25c9702..8b8f4a2 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -1,4 +1,7 @@
/*
+ * (C) Copyright 2008 Atmel Corp.
+ * Antonio R. Costa <antonio.costa <at> atmel.com>
+ * <costa.antonior at gmail.com>
* (C) Copyright 2003
* Kyle Harris, kharris at nexus-tech.net
*
@@ -27,10 +30,16 @@
int do_mmc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
- if (mmc_init (1) != 0) {
- printf ("No MMC card found\n");
+ int mmc_verbosity= 0;
+ char * p_verbosity = NULL;
+
+ if (p_verbosity = getenv("mmc_verbosity"))
+ mmc_verbosity = 1;
+ if (mmc_init (mmc_verbosity) != 0) {
+ puts("No MMC/SD card found\n");
return 1;
- }
+ } else
+ puts("Found an MMC/SD card\n");
return 0;
}
--
1.5.4.3
More information about the U-Boot
mailing list