[coreboot-gerrit] New patch to review for coreboot: 145c5ba usbdebug: Improve solving EHCI debug port problems

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Thu Jun 6 14:20:32 CEST 2013


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3382

-gerrit

commit 145c5baf197e250c2220befc8a81cf84462fd6c8
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Thu Jun 6 10:28:22 2013 +0300

    usbdebug: Improve solving EHCI debug port problems
    
    Add comment how one can debug the usbdebug hardware init.
    Do not send printk's to usbdebug console when one is debugging
    the usbdebug console initialisation itself.
    
    Change-Id: I21a285cb31cf64e853bc626f8b6a617bc5a8be19
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/lib/usbdebug.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index 24d7967..200121f 100644
--- a/src/lib/usbdebug.c
+++ b/src/lib/usbdebug.c
@@ -27,7 +27,11 @@
 #include <ehci.h>
 #include <usbdebug.h>
 
-// Does not work if we want early printk to do usb debug, too..
+/* Set this to 1 to debug the start-up of EHCI debug port hardware. You need
+ * to modify console_init() to initialise some other console before usbdebug
+ * to receive the printk lines from here.
+ * There will be no real usbdebug console output while DBGP_DEBUG is set.
+ */
 #define DBGP_DEBUG 0
 #if DBGP_DEBUG
 # define dbgp_printk(fmt_arg...) printk(BIOS_DEBUG, fmt_arg)
@@ -578,7 +582,7 @@ int early_usbdebug_init(void)
 
 void usbdebug_tx_byte(struct ehci_debug_info *dbg_info, unsigned char data)
 {
-
+#if DBGP_DEBUG == 0
 	if (!dbg_info) {
 		/* "Find" dbg_info structure in Cache */
 		dbg_info = (struct ehci_debug_info *)
@@ -592,10 +596,12 @@ void usbdebug_tx_byte(struct ehci_debug_info *dbg_info, unsigned char data)
 			dbg_info->bufidx = 0;
 		}
 	}
+#endif
 }
 
 void usbdebug_tx_flush(struct ehci_debug_info *dbg_info)
 {
+#if DBGP_DEBUG == 0
 	if (!dbg_info) {
 		/* "Find" dbg_info structure in Cache */
 		dbg_info = (struct ehci_debug_info *)
@@ -606,4 +612,5 @@ void usbdebug_tx_flush(struct ehci_debug_info *dbg_info)
 		dbgp_bulk_write_x(dbg_info, dbg_info->buf, dbg_info->bufidx);
 		dbg_info->bufidx = 0;
 	}
+#endif
 }



More information about the coreboot-gerrit mailing list