summaryrefslogtreecommitdiff
path: root/src/console/init.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-24 12:32:24 +0300
committerNico Huber <nico.h@gmx.de>2017-09-25 13:35:29 +0000
commitc8bc983673cb2e700e0e65299c4471721f273818 (patch)
tree95f1a83c3cd6b00af8d046f1c9409f5b9254e0e5 /src/console/init.c
parent8b64e7ae21f2042f837f3af222754e1e8ef5b3d6 (diff)
console: Ignore loglevel in nvram until ramstage
Calling get_option() triggers printk's before consoles are ready. Skip the call since console_loglevel is const anyways for __PRE_RAM__. Change-Id: I4d444bee1394449ce096c0aa30dca56365290e31 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21659 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/console/init.c')
-rw-r--r--src/console/init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/console/init.c b/src/console/init.c
index c1565a420f..422315ad2a 100644
--- a/src/console/init.c
+++ b/src/console/init.c
@@ -33,7 +33,7 @@ static int console_loglevel = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
static inline int get_log_level(void)
{
- if (IS_ENABLED(CONSOLE_LEVEL_CONST))
+ if (CONSOLE_LEVEL_CONST)
return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
return console_loglevel;
@@ -51,6 +51,9 @@ static void init_log_level(void)
{
int debug_level = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
+ if (CONSOLE_LEVEL_CONST)
+ return;
+
get_option(&debug_level, "debug_level");
set_log_level(debug_level);