summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-10-17 20:12:35 -0600
committerTom Rini <trini@konsulko.com>2016-10-23 18:33:18 -0400
commit98af87997670af840ef178f76b4d6888534a6700 (patch)
tree5206afd6aff96620267f7daa62534bca782c459f /common
parent53302bdc480ac8c36ec4da8bd444c63f7872ba02 (diff)
Convert SILENT_CONSOLE options to Kconfig
Move these option to Kconfig and tidy up existing uses. The Power PC boards don't have a suitable common element: the common header files don't appear to line up with the Kconfig files as far as I can tell. This results in a lot of defconfig changes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagan Teki <jteki@openedev.com> [trini: Re-migrate, update common/console.c logic] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig45
-rw-r--r--common/console.c4
2 files changed, 47 insertions, 2 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 1198f2684b..a8dfd7c2e2 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -170,6 +170,8 @@ config BOOTDELAY
See doc/README.autoboot for details.
+menu "Console"
+
config CONSOLE_RECORD
bool "Console recording"
help
@@ -203,6 +205,49 @@ config IDENT_STRING
help
This options adds the board specific name to u-boot version.
+config SILENT_CONSOLE
+ bool "Support a silent console"
+ help
+ This option allows the console to be silenced, meaning that no
+ output will appear on the console devices. This is controlled by
+ setting the environment vaariable 'silent' to a non-empty value.
+ Note this also silences the console when booting Linux.
+
+ When the console is set up, the variable is checked, and the
+ GD_FLG_SILENT flag is set. Changing the environment variable later
+ will update the flag.
+
+config SILENT_U_BOOT_ONLY
+ bool "Only silence the U-Boot console"
+ depends on SILENT_CONSOLE
+ help
+ Normally when the U-Boot console is silenced, Linux's console is
+ also silenced (assuming the board boots into Linux). This option
+ allows the linux console to operate normally, even if U-Boot's
+ is silenced.
+
+config SILENT_CONSOLE_UPDATE_ON_SET
+ bool "Changes to the 'silent' environment variable update immediately"
+ depends on SILENT_CONSOLE
+ default y if SILENT_CONSOLE
+ help
+ When the 'silent' environment variable is changed, update the
+ console silence flag immediately. This allows 'setenv' to be used
+ to silence or un-silence the console.
+
+ The effect is that any change to the variable will affect the
+ GD_FLG_SILENT flag.
+
+config SILENT_CONSOLE_UPDATE_ON_RELOC
+ bool "Allow flags to take effect on relocation"
+ depends on SILENT_CONSOLE
+ help
+ In some cases the environment is not available until relocation
+ (e.g. NAND). This option makes the value of the 'silent'
+ environment variable take effect at relocation.
+
+endmenu
+
config SYS_NO_FLASH
bool "Disable support for parallel NOR flash"
default n
diff --git a/common/console.c b/common/console.c
index f38f71f819..282fcc8832 100644
--- a/common/console.c
+++ b/common/console.c
@@ -66,11 +66,11 @@ U_BOOT_ENV_CALLBACK(console, on_console);
static int on_silent(const char *name, const char *value, enum env_op op,
int flags)
{
-#ifndef CONFIG_SILENT_CONSOLE_UPDATE_ON_SET
+#if !CONFIG_IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_SET)
if (flags & H_INTERACTIVE)
return 0;
#endif
-#ifndef CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC
+#if !CONFIG_IS_ENABLED(CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC)
if ((flags & H_INTERACTIVE) == 0)
return 0;
#endif