summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-06-06 10:28:22 +0300
committerRonald G. Minnich <rminnich@gmail.com>2013-06-12 05:20:04 +0200
commit1b7fd08ca174e3a3d69feeb7c4105f93c5d4687a (patch)
treeac5a8891cc9cfdaaded8bb61b352a277be44b8a4 /src
parent8351243e4a99c7159ec3257db272b735efff218c (diff)
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@gmail.com> Reviewed-on: http://review.coreboot.org/3382 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/usbdebug.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index 24d7967127..200121ff5b 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
}