summaryrefslogtreecommitdiff
path: root/common/console.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-10-10 10:05:42 +0000
committerwdenk <wdenk>2003-10-10 10:05:42 +0000
commitf72da3406bf6f1c1bce9aa03b07d070413a916af (patch)
tree5494a96d6da4706d1add61cb36d8bace834fbb8f /common/console.c
parent5da627a424b3ad2d38a81886ba4a18e5123a6788 (diff)
downloadu-boot-imx-f72da3406bf6f1c1bce9aa03b07d070413a916af.zip
u-boot-imx-f72da3406bf6f1c1bce9aa03b07d070413a916af.tar.gz
u-boot-imx-f72da3406bf6f1c1bce9aa03b07d070413a916af.tar.bz2
Added config option CONFIG_SILENT_CONSOLE. See doc/README.silent
for more information
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/console.c b/common/console.c
index 3ef60fd..da49c96 100644
--- a/common/console.c
+++ b/common/console.c
@@ -365,10 +365,16 @@ int console_init_f (void)
DECLARE_GLOBAL_DATA_PTR;
gd->have_console = 1;
+
+#ifdef CONFIG_SILENT_CONSOLE
+ if (getenv("silent") != NULL)
+ gd->flags |= GD_FLG_SILENT;
+#endif
+
return (0);
}
-#if defined(CFG_CONSOLE_IS_IN_ENV) || defined(CONFIG_SPLASH_SCREEN)
+#if defined(CFG_CONSOLE_IS_IN_ENV) || defined(CONFIG_SPLASH_SCREEN) || defined(CONFIG_SILENT_CONSOLE)
/* search a device */
device_t *search_device (int flags, char *name)
{
@@ -494,6 +500,12 @@ int console_init_r (void)
outputdev = search_device (DEV_FLAGS_OUTPUT, "nulldev");
#endif
+#ifdef CONFIG_SILENT_CONSOLE
+ /* Suppress all output if "silent" mode requested */
+ if (gd->flags & GD_FLG_SILENT)
+ outputdev = search_device (DEV_FLAGS_OUTPUT, "nulldev");
+#endif
+
/* Scan devices looking for input and output devices */
for (i = 1;
(i <= items) && ((inputdev == NULL) || (outputdev == NULL));