summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-08-12 16:11:34 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-08-23 05:02:10 +0200
commit8ff3d68e93c74d82dc289036347c3da74c395c88 (patch)
tree0a196840cb31fbf7f41a3c50400213084c529794 /src
parenteabfd3a7c162d5eb96f65085ad8b05238e53a437 (diff)
usbdebug: Add logging level to debugging
Increase existing level from DEBUG to INFO. Change-Id: Ic5934aec449f921af96dd3a6524f7275f8de1304 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3859 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/lib/usbdebug.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/usbdebug.c b/src/lib/usbdebug.c
index 9e6fcac90d..4cd2987d6f 100644
--- a/src/lib/usbdebug.c
+++ b/src/lib/usbdebug.c
@@ -58,9 +58,9 @@ struct ehci_debug_info {
};
#if CONFIG_DEBUG_USBDEBUG
-# define dbgp_printk(fmt_arg...) printk(BIOS_DEBUG, fmt_arg)
+# define dprintk(LEVEL, args...) printk(LEVEL, args)
#else
-# define dbgp_printk(fmt_arg...) do {} while(0)
+# define dprintk(LEVEL, args...) do {} while(0)
#endif
#define USB_DEBUG_DEVNUM 127
@@ -427,13 +427,13 @@ try_next_port:
debug_port = HCS_DEBUG_PORT(hcs_params);
n_ports = HCS_N_PORTS(hcs_params);
- dbgp_printk("ehci_bar: 0x%x\n", ehci_bar);
- dbgp_printk("debug_port: %d\n", debug_port);
- dbgp_printk("n_ports: %d\n", n_ports);
+ dprintk(BIOS_INFO, "ehci_bar: 0x%x\n", ehci_bar);
+ dprintk(BIOS_INFO, "debug_port: %d\n", debug_port);
+ dprintk(BIOS_INFO, "n_ports: %d\n", n_ports);
for (i = 1; i <= n_ports; i++) {
portsc = read32((unsigned long)&ehci_regs->port_status[i-1]);
- dbgp_printk("PORTSC #%d: %08x\n", i, portsc);
+ dprintk(BIOS_INFO, "PORTSC #%d: %08x\n", i, portsc);
}
if(port_map_tried && (new_debug_port != debug_port)) {
@@ -455,11 +455,11 @@ try_next_port:
} while ((cmd & CMD_RESET) && (--loop > 0));
if(!loop) {
- dbgp_printk("Could not reset EHCI controller.\n");
+ dprintk(BIOS_INFO, "Could not reset EHCI controller.\n");
// on some systems it works without succeeding here.
// return -2;
} else {
- dbgp_printk("EHCI controller reset successfully.\n");
+ dprintk(BIOS_INFO, "EHCI controller reset successfully.\n");
}
/* Claim ownership, but do not enable yet */
@@ -485,18 +485,18 @@ try_next_port:
} while ((status & STS_HALT) && (--loop > 0));
if(!loop) {
- dbgp_printk("EHCI could not be started.\n");
+ dprintk(BIOS_INFO, "EHCI could not be started.\n");
return -3;
}
- dbgp_printk("EHCI started.\n");
+ dprintk(BIOS_INFO, "EHCI started.\n");
/* Wait for a device to show up in the debug port */
ret = ehci_wait_for_port(ehci_regs, debug_port);
if (ret < 0) {
- dbgp_printk("No device found in debug port %d\n", debug_port);
+ dprintk(BIOS_INFO, "No device found in debug port %d\n", debug_port);
goto next_debug_port;
}
- dbgp_printk("EHCI done waiting for port.\n");
+ dprintk(BIOS_INFO, "EHCI done waiting for port.\n");
/* Enable the debug port */
ctrl = read32((unsigned long)&ehci_debug->control);
@@ -504,12 +504,12 @@ try_next_port:
write32((unsigned long)&ehci_debug->control, ctrl);
ctrl = read32((unsigned long)&ehci_debug->control);
if ((ctrl & DBGP_CLAIM) != DBGP_CLAIM) {
- dbgp_printk("No device in EHCI debug port.\n");
+ dprintk(BIOS_INFO, "No device in EHCI debug port.\n");
write32((unsigned long)&ehci_debug->control, ctrl & ~DBGP_CLAIM);
ret = -4;
goto err;
}
- dbgp_printk("EHCI debug port enabled.\n");
+ dprintk(BIOS_INFO, "EHCI debug port enabled.\n");
/* Completely transfer the debug device to the debug controller */
portsc = read32((unsigned long)&ehci_regs->port_status[debug_port - 1]);
@@ -528,12 +528,12 @@ try_next_port:
break;
}
if (devnum > 127) {
- dbgp_printk("Could not find attached debug device.\n");
+ dprintk(BIOS_INFO, "Could not find attached debug device.\n");
ret = -5;
goto err;
}
if (ret < 0) {
- dbgp_printk("Attached device is not a debug device.\n");
+ dprintk(BIOS_INFO, "Attached device is not a debug device.\n");
ret = -6;
goto err;
}
@@ -544,13 +544,13 @@ try_next_port:
USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
USB_REQ_SET_ADDRESS, USB_DEBUG_DEVNUM, 0, NULL, 0);
if (ret < 0) {
- dbgp_printk("Could not move attached device to %d.\n",
+ dprintk(BIOS_INFO, "Could not move attached device to %d.\n",
USB_DEBUG_DEVNUM);
ret = -7;
goto err;
}
devnum = USB_DEBUG_DEVNUM;
- dbgp_printk("EHCI debug device renamed to 127.\n");
+ dprintk(BIOS_INFO, "EHCI debug device renamed to 127.\n");
}
/* Enable the debug interface */
@@ -558,20 +558,20 @@ try_next_port:
USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
USB_REQ_SET_FEATURE, USB_DEVICE_DEBUG_MODE, 0, NULL, 0);
if (ret < 0) {
- dbgp_printk("Could not enable EHCI debug device.\n");
+ dprintk(BIOS_INFO, "Could not enable EHCI debug device.\n");
ret = -8;
goto err;
}
- dbgp_printk("EHCI debug interface enabled.\n");
+ dprintk(BIOS_INFO, "EHCI debug interface enabled.\n");
/* Perform a small write to get the even/odd data state in sync */
ret = dbgp_bulk_write(ehci_debug, USB_DEBUG_DEVNUM, dbgp_desc.bDebugOutEndpoint, "USB\r\n",5);
if (ret < 0) {
- dbgp_printk("dbgp_bulk_write failed: %d\n", ret);
+ dprintk(BIOS_INFO, "dbgp_bulk_write failed: %d\n", ret);
ret = -9;
goto err;
}
- dbgp_printk("Test write done\n");
+ dprintk(BIOS_INFO, "Test write done\n");
info->ehci_caps = ehci_caps;
info->ehci_regs = ehci_regs;