Proposal for environment variable mmc_verbosity
to control verbosity levels in mmc code

Signed-off-by: Antonio R. Costa <[EMAIL PROTECTED]>

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>
+ *                  <[EMAIL PROTECTED]>
  * (C) Copyright 2003
  * Kyle Harris, [EMAIL PROTECTED]
  *
@@ -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


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to