summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@google.com>2011-01-28 08:05:54 +0000
committerStefan Reinauer <stepan@openbios.org>2011-01-28 08:05:54 +0000
commit16ce01b0d8414a7250fcf142a966ff22c153e85f (patch)
tree38c48e5b4d32349b8661c97ac8c00ee7c29d4f48 /src/arch/x86
parent36ade67007e0e93fb36a982f87e91bf12e2ed869 (diff)
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 <reinauer@google.com> Acked-by: Patrick Georgi <patrick.georgi@secunet.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6315 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/lib/printk_init.c21
1 files changed, 14 insertions, 7 deletions
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 <console/console.h>
#include <console/vtxprintf.h>
+#if CONFIG_CONSOLE_SERIAL8250
#include <uart8250.h>
-
+#endif
+#if CONFIG_USBDEBUG
+#include <usbdebug.h>
+#endif
#if CONFIG_CONSOLE_NE2K
#include <console/ne2k.h>
#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, ...)