See patch

- include usbdebug.c where appropriate
- don't do ne2k_transmit()s without actual output

Signed-off-by: Stefan Reinauer <[email protected]>

Index: src/include/console/console.h
===================================================================
--- src/include/console/console.h	(revision 6491)
+++ src/include/console/console.h	(working copy)
@@ -158,6 +158,9 @@
 #if CONFIG_CONSOLE_SERIAL8250
 #include "lib/uart8250.c"
 #endif
+#if CONFIG_USBDEBUG
+#include "lib/usbdebug.c"
+#endif
 #if CONFIG_CONSOLE_NE2K
 #include "lib/ne2k.c"
 #endif
@@ -167,6 +170,9 @@
 #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(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
@@ -188,6 +194,9 @@
 #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(byte, CONFIG_CONSOLE_NE2K_IO_PORT);
 		ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
@@ -200,10 +209,10 @@
 	if (console_loglevel >= loglevel) {
 		__console_tx_nibble((value >>  4U) & 0x0fU);
 		__console_tx_nibble(value & 0x0fU);
-	}
 #if CONFIG_CONSOLE_NE2K
 		ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
+	}
 }
 
 static void __console_tx_hex16(int loglevel, unsigned short value)
@@ -213,10 +222,10 @@
 		__console_tx_nibble((value >>  8U) & 0x0fU);
 		__console_tx_nibble((value >>  4U) & 0x0fU);
 		__console_tx_nibble(value & 0x0fU);
-	}
 #if CONFIG_CONSOLE_NE2K
 		ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
+	}
 }
 
 static void __console_tx_hex32(int loglevel, unsigned int value)
@@ -230,10 +239,10 @@
 		__console_tx_nibble((value >>  8U) & 0x0fU);
 		__console_tx_nibble((value >>  4U) & 0x0fU);
 		__console_tx_nibble(value & 0x0fU);
-	}
 #if CONFIG_CONSOLE_NE2K
 		ne2k_transmit(CONFIG_CONSOLE_NE2K_IO_PORT);
 #endif
+	}
 }
 
 static void __console_tx_string(int loglevel, const char *str)
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to