From 6a503b6a0f08bf4236c4c37d75c67182a7af4b02 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 31 Dec 2012 17:28:43 -0800 Subject: make early serial console support more generic This patch makes pre-RAM serial init more generic, particularly for platforms which do not necessarily need cache-as-RAM in order to use the serial console and do not have a standard 8250 serial port. This adds a Kconfig variable to set romstage-* for very early serial console init. The current method assumes that cache-as-RAM should enable this, so to maintain compatibility selecting CACHE_AS_RAM will also select EARLY_SERIAL_CONSOLE. The UART code structure needs some rework, but the use of ROMCC, romstage, and then ramstage makes things complex. uart.h now includes all .h files for all uarts. All 2 of them. This is actually a simplifying change. Change-Id: I089e7af633c227baf3c06c685f005e9d0e4b38ce Signed-off-by: David Hendricks Signed-off-by: Ronald G. Minnich Reviewed-on: http://review.coreboot.org/2086 Tested-by: build bot (Jenkins) --- src/console/console.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/console/console.c') diff --git a/src/console/console.c b/src/console/console.c index d5f25a5fee..ad8f217fe8 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -99,13 +99,15 @@ int console_tst_byte(void) #else // __PRE_RAM__ ^^^ NOT defined vvv defined +#include + void console_init(void) { #if CONFIG_USBDEBUG enable_usbdebug(CONFIG_USBDEBUG_DEFAULT_PORT); early_usbdebug_init(); #endif -#if CONFIG_CONSOLE_SERIAL8250 +#if CONFIG_HAVE_UART_IO_MAPPED || CONFIG_HAVE_UART_MEMORY_MAPPED uart_init(); #endif #if CONFIG_DRIVERS_OXFORD_OXPCIE && CONFIG_CONSOLE_SERIAL8250MEM -- cgit v1.2.3