From 16ce01b0d8414a7250fcf142a966ff22c153e85f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 28 Jan 2011 08:05:54 +0000 Subject: This patch gets usbdebug console working in romstage. - actually hook up usbdebug in printk/print_ for romstage - make usbdebug.c more similar to the Linux kernel version it was originally derived from. - increase retries and timing for usbdebug init (at least one chipset seems to need this) - src/pc80/usbdebug_serial.c is not needed - some small console cleanups Signed-off-by: Stefan Reinauer Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6315 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/x86/lib/printk_init.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/lib/printk_init.c b/src/arch/x86/lib/printk_init.c index 2f7f751832..e8a926356e 100644 --- a/src/arch/x86/lib/printk_init.c +++ b/src/arch/x86/lib/printk_init.c @@ -19,23 +19,30 @@ #include #include +#if CONFIG_CONSOLE_SERIAL8250 #include - +#endif +#if CONFIG_USBDEBUG +#include +#endif #if CONFIG_CONSOLE_NE2K #include #endif static void console_tx_byte(unsigned char byte) { -#if CONFIG_CONSOLE_NE2K -#ifdef __PRE_RAM__ - ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT); -#endif -#endif if (byte == '\n') - uart8250_tx_byte(CONFIG_TTYS0_BASE, '\r'); + console_tx_byte('\r'); +#if CONFIG_CONSOLE_SERIAL8250 uart8250_tx_byte(CONFIG_TTYS0_BASE, byte); +#endif +#if CONFIG_USBDEBUG + usbdebug_tx_byte(byte); +#endif +#if CONFIG_CONSOLE_NE2K + ne2k_append_data(&byte, 1, CONFIG_CONSOLE_NE2K_IO_PORT); +#endif } int do_printk(int msg_level, const char *fmt, ...) -- cgit v1.2.3