From 580fa2bf316d4796e5ed76cbbd3e454479fb0688 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Wed, 6 Feb 2013 21:51:15 +0800 Subject: console: Only print romstage messages with EARLY_CONSOLE enabled. Revise console source file dependency (especially for EARLY_CONSOLE) and interpret printk/console_init according to EARLY_CONSOLE setting (no-ops if EARLY_CONSOLE is not defined). Verified to boot on x86/qemu and armv7/snow. Disabling EARLY_CONSOLE correctly stops romstage messages on x86/qemu (armv7/snow needs more changes to work). Change-Id: Idbbd3a26bc1135c9d3ae282aad486961fb60e0ea Signed-off-by: Hung-Te Lin Reviewed-on: http://review.coreboot.org/2300 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: David Hendricks --- src/console/console.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/console/console.c') diff --git a/src/console/console.c b/src/console/console.c index d4b4b8834a..aec711b5f8 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -99,10 +99,10 @@ int console_tst_byte(void) #else // __PRE_RAM__ ^^^ NOT defined vvv defined -#include - void console_init(void) { +#if CONFIG_EARLY_CONSOLE + #if CONFIG_USBDEBUG enable_usbdebug(CONFIG_USBDEBUG_DEFAULT_PORT); early_usbdebug_init(); @@ -127,5 +127,7 @@ void console_init(void) COREBOOT_BUILD " starting...\n"; print_info(console_test); + +#endif /* CONFIG_EARLY_CONSOLE */ } #endif -- cgit v1.2.3