diff options
Diffstat (limited to 'src/arch/armv7/lib')
-rw-r--r-- | src/arch/armv7/lib/Makefile.inc | 6 | ||||
-rw-r--r-- | src/arch/armv7/lib/early_console.c (renamed from src/arch/armv7/lib/romstage_console.c) | 22 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/arch/armv7/lib/Makefile.inc b/src/arch/armv7/lib/Makefile.inc index 343e9f8378..048e0717df 100644 --- a/src/arch/armv7/lib/Makefile.inc +++ b/src/arch/armv7/lib/Makefile.inc @@ -1,14 +1,12 @@ bootblock-y += syslib.c -bootblock-y += romstage_console.c +bootblock-$(CONFIG_EARLY_CONSOLE) += early_console.c romstage-y += cache_v7.c romstage-y += cache-cp15.c romstage-y += div0.c romstage-y += div64.S -romstage-y += romstage_console.c romstage-y += syslib.c - -#ramstage-y += printk_init.c +romstage-$(CONFIG_EARLY_CONSOLE) += early_console.c ramstage-y += div0.c ramstage-y += div64.S diff --git a/src/arch/armv7/lib/romstage_console.c b/src/arch/armv7/lib/early_console.c index b0ac34e32e..68e81c632e 100644 --- a/src/arch/armv7/lib/romstage_console.c +++ b/src/arch/armv7/lib/early_console.c @@ -19,13 +19,6 @@ #include <console/console.h> #include <console/vtxprintf.h> -// TODO Unify with x86 (CONFIG_CONSOLE_SERIAL8250) -#if CONFIG_CONSOLE_SERIAL -#include <uart.h> -#endif -#if CONFIG_USBDEBUG -#include <usbdebug.h> -#endif /* FIXME: need to make console driver more generic */ void console_tx_byte(unsigned char byte) @@ -33,6 +26,15 @@ void console_tx_byte(unsigned char byte) if (byte == '\n') console_tx_byte('\r'); +#if CONFIG_CONSOLE_SERIAL8250MEM + if (oxford_oxpcie_present) { + uart8250_mem_tx_byte( + CONFIG_OXFORD_OXPCIE_BASE_ADDRESS + 0x1000, byte); + } +#endif +#if CONFIG_CONSOLE_SERIAL8250 + uart8250_tx_byte(CONFIG_TTYS0_BASE, byte); +#endif #if CONFIG_CONSOLE_SERIAL_UART uart_tx_byte(byte); #endif @@ -46,6 +48,12 @@ void console_tx_byte(unsigned char byte) static void _console_tx_flush(void) { +#if CONFIG_CONSOLE_SERIAL8250MEM + uart8250_mem_tx_flush(CONFIG_OXFORD_OXPCIE_BASE_ADDRESS + 0x1000); +#endif +#if CONFIG_CONSOLE_SERIAL8250 + uart8250_tx_flush(CONFIG_TTYS0_BASE); +#endif #if CONFIG_CONSOLE_SERIAL_UART uart_tx_flush(); #endif |