reformatted

This commit is contained in:
Markus Fröschle
2014-09-06 18:35:06 +00:00
parent ed13b05209
commit 18fb66344d

View File

@@ -56,7 +56,7 @@
#undef SHOW_INFO #undef SHOW_INFO
#undef OHCI_FILL_TRACE #undef OHCI_FILL_TRACE
#define DEBUG_OHCI //#define DEBUG_OHCI
#ifdef DEBUG_OHCI #ifdef DEBUG_OHCI
#define dbg(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0) #define dbg(format, arg...) do { xprintf("DEBUG: %s(): " format, __FUNCTION__, ##arg); } while (0)
#else #else
@@ -330,7 +330,6 @@ static void maybe_print_eds(ohci_t *controller, char *label, uint32_t value)
} }
} }
#ifdef DEBUG_OHCI
static char *hcfs2string(int state) static char *hcfs2string(int state)
{ {
switch (state) switch (state)
@@ -342,7 +341,6 @@ static char *hcfs2string(int state)
} }
return "?"; return "?";
} }
#endif
/* dump control and status registers */ /* dump control and status registers */
static void ohci_dump_status(ohci_t *controller) static void ohci_dump_status(ohci_t *controller)
@@ -1785,7 +1783,11 @@ static int hc_reset(ohci_t *ohci)
/* Disable HC interrupts */ /* Disable HC interrupts */
writel(OHCI_INTR_MIE, &ohci->regs->intrdisable); writel(OHCI_INTR_MIE, &ohci->regs->intrdisable);
#ifdef DEBUG_OHCI
ohci_dump_status(ohci); ohci_dump_status(ohci);
#endif /* DEBUG_OHCI */
dbg("USB OHCI HC reset_hc usb-%s-%c: ctrl = 0x%X\r\n", ohci->slot_name, dbg("USB OHCI HC reset_hc usb-%s-%c: ctrl = 0x%X\r\n", ohci->slot_name,
(char) ohci->controller + '0', readl(&ohci->regs->control)); (char) ohci->controller + '0', readl(&ohci->regs->control));
@@ -1801,7 +1803,9 @@ static int hc_reset(ohci_t *ohci)
if (--timeout == 0) if (--timeout == 0)
{ {
err("USB HC reset timed out!"); err("USB HC reset timed out!");
#ifdef DEBUG_OHCI
ohci_dump_status(ohci); ohci_dump_status(ohci);
#endif /* DEBUG_OHCI */
return -1; return -1;
} }
wait(10); wait(10);