Author: stepan
Date: 2009-04-22 01:05:13 +0200 (Wed, 22 Apr 2009)
New Revision: 4162

Modified:
   trunk/coreboot-v2/src/include/usbdebug_direct.h
   trunk/coreboot-v2/src/lib/usbdebug_direct.c
Log:
- function prototypes do not need "extern"
- fix up debug messages of usb debug console
(trivial)

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



Modified: trunk/coreboot-v2/src/include/usbdebug_direct.h
===================================================================
--- trunk/coreboot-v2/src/include/usbdebug_direct.h     2009-04-21 23:03:20 UTC 
(rev 4161)
+++ trunk/coreboot-v2/src/include/usbdebug_direct.h     2009-04-21 23:05:13 UTC 
(rev 4162)
@@ -9,9 +9,10 @@
         unsigned endpoint_out;
         unsigned endpoint_in;
 };
-extern int dbgp_bulk_write_x(struct ehci_debug_info *dbg_info, const char 
*bytes, int size);
-extern int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int 
size);
-extern void set_ehci_base(unsigned ehci_base);
-extern void set_ehci_debug(unsigned ehci_deug);
-extern unsigned get_ehci_debug(void);
+int dbgp_bulk_write_x(struct ehci_debug_info *dbg_info, const char *bytes, int 
size);
+int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size);
+void set_ehci_base(unsigned ehci_base);
+void set_ehci_debug(unsigned ehci_deug);
+unsigned get_ehci_debug(void);
+void set_debug_port(unsigned port);
 #endif

Modified: trunk/coreboot-v2/src/lib/usbdebug_direct.c
===================================================================
--- trunk/coreboot-v2/src/lib/usbdebug_direct.c 2009-04-21 23:03:20 UTC (rev 
4161)
+++ trunk/coreboot-v2/src/lib/usbdebug_direct.c 2009-04-21 23:05:13 UTC (rev 
4162)
@@ -368,13 +368,14 @@
        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);
 
-#if 0
+#if 1
         for (i = 1; i <= n_ports; i++) {
                 portsc = readl(&ehci_regs->port_status[i-1]);
-                dbgp_printk("portstatus%d: %08x\n", i, portsc);
+                dbgp_printk("PORTSC #%d: %08x\n", i, portsc);
         }
 #endif
 
@@ -396,10 +397,10 @@
        } while ((cmd & CMD_RESET) && (--loop > 0));
 
        if(!loop) {
-               dbgp_printk("can not reset ehci\n");
+               dbgp_printk("Could not reset EHCI controller.\n");
                return;
        }
-       dbgp_printk("ehci reset done\n");
+       dbgp_printk("EHCI controller reset successfully.\n");
 
        /* Claim ownership, but do not enable yet */
        ctrl = readl(&ehci_debug->control);
@@ -423,10 +424,10 @@
        } while ((status & STS_HALT) && (--loop>0));
 
        if(!loop) {
-               dbgp_printk("ehci can be started\n");
+               dbgp_printk("EHCI could not be started.\n");
                return;
        }
-       dbgp_printk("ehci started\n");
+       dbgp_printk("EHCI started.\n");
 
        /* Wait for a device to show up in the debug port */
        ret = ehci_wait_for_port(ehci_regs, debug_port);
@@ -434,7 +435,7 @@
                dbgp_printk("No device found in debug port %d\n", debug_port);
                goto next_debug_port;
        }
-       dbgp_printk("ehci wait for port done\n");
+       dbgp_printk("EHCI done waiting for port.\n");
 
        /* Enable the debug port */
        ctrl = readl(&ehci_debug->control);
@@ -442,11 +443,11 @@
        writel(ctrl, &ehci_debug->control);
        ctrl = readl(&ehci_debug->control);
        if ((ctrl & DBGP_CLAIM) != DBGP_CLAIM) {
-               dbgp_printk("No device in debug port\n");
+               dbgp_printk("No device in EHCI debug port.\n");
                writel(ctrl & ~DBGP_CLAIM, &ehci_debug->control);
                goto err;
        }
-       dbgp_printk("debug ported enabled\n");
+       dbgp_printk("EHCI debug port enabled.\n");
 
        /* Completely transfer the debug device to the debug controller */
        portsc = readl(&ehci_regs->port_status[debug_port - 1]);
@@ -465,11 +466,11 @@
                        break;
        }
        if (devnum > 127) {
-               dbgp_printk("Could not find attached debug device\n");
+               dbgp_printk("Could not find attached debug device.\n");
                goto err;
        }
        if (ret < 0) {
-               dbgp_printk("Attached device is not a debug device\n");
+               dbgp_printk("Attached device is not a debug device.\n");
                goto err;
        }
        dbgp_endpoint_out = dbgp_desc.bDebugOutEndpoint;
@@ -481,12 +482,12 @@
                        USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
                        USB_REQ_SET_ADDRESS, USB_DEBUG_DEVNUM, 0, (void *)0, 0);
                if (ret < 0) {
-                       dbgp_printk("Could not move attached device to %d\n", 
+                       dbgp_printk("Could not move attached device to %d.\n", 
                                USB_DEBUG_DEVNUM);
                        goto err;
                }
                devnum = USB_DEBUG_DEVNUM;
-               dbgp_printk("debug device renamed to 127\n");
+               dbgp_printk("EHCI debug device renamed to 127.\n");
        }
 
        /* Enable the debug interface */
@@ -494,10 +495,10 @@
                USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
                USB_REQ_SET_FEATURE, USB_DEVICE_DEBUG_MODE, 0, (void *)0, 0);
        if (ret < 0) {
-               dbgp_printk(" Could not enable the debug device\n");
+               dbgp_printk("Could not enable EHCI debug device.\n");
                goto err;
        }
-       dbgp_printk("debug interface enabled\n");
+       dbgp_printk("EHCI debug interface enabled.\n");
 
        /* Perform a small write to get the even/odd data state in sync
         */
@@ -506,7 +507,7 @@
                dbgp_printk("dbgp_bulk_write failed: %d\n", ret);
                goto err;
        }
-       dbgp_printk("small write doned\n");
+       dbgp_printk("Test write done\n");
 
        info->ehci_caps = ehci_caps;
        info->ehci_regs = ehci_regs;


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to