Lines Matching refs:ohci
23 #define ohci_dbg_sw(ohci, next, size, format, arg...) \
30 ohci_dbg(ohci,format, ## arg ); \
34 #define ohci_dbg_nosw(ohci, next, size, format, arg...) \
43 struct ohci_hcd *ohci,
49 ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n",
65 struct ohci_hcd *ohci,
72 ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value);
86 static const char *rh_state_string(struct ohci_hcd *ohci)
88 switch (ohci->rh_state) {
255 static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label,
258 u32 tmp = hc32_to_cpup (ohci, &td->hwINFO);
260 ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n",
264 hc32_to_cpup (ohci, &td->hwNextTD));
281 ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s\n", tmp,
285 cbp = hc32_to_cpup (ohci, &td->hwCBP);
286 be = hc32_to_cpup (ohci, &td->hwBE);
287 ohci_dbg (ohci, " cbp %08x be %08x (len %d)\n", cbp, be,
291 ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x\n", tmp,
296 ohci_dbg (ohci, " bp0 %08x be %08x\n",
297 hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff,
298 hc32_to_cpup (ohci, &td->hwBE));
300 u16 psw = ohci_hwPSW (ohci, td, i);
302 ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d\n", i,
312 ohci_dump_ed (const struct ohci_hcd *ohci, const char *label,
315 u32 tmp = hc32_to_cpu (ohci, ed->hwINFO);
318 ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n",
321 hc32_to_cpup (ohci, &ed->hwNextED));
327 ohci_dbg (ohci,
337 tmp = hc32_to_cpup (ohci, &ed->hwHeadP);
338 ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s\n",
342 hc32_to_cpup (ohci, &ed->hwTailP),
353 ohci_dump_td (ohci, " ->", td);
393 struct ohci_hcd *ohci;
400 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
413 u32 info = hc32_to_cpu (ohci, ed->hwINFO);
414 u32 headp = hc32_to_cpu (ohci, ed->hwHeadP);
437 info = hc32_to_cpup (ohci, &td->hwINFO);
438 cbp = hc32_to_cpup (ohci, &td->hwCBP);
439 be = hc32_to_cpup (ohci, &td->hwBE);
467 struct ohci_hcd *ohci;
471 ohci = buf->ohci;
475 spin_lock_irqsave (&ohci->lock, flags);
476 temp = show_list(ohci, buf->page, size, ohci->ed_controltail);
477 temp += show_list(ohci, buf->page + temp, size - temp,
478 ohci->ed_bulktail);
479 spin_unlock_irqrestore (&ohci->lock, flags);
488 struct ohci_hcd *ohci;
500 ohci = buf->ohci;
509 spin_lock_irqsave (&ohci->lock, flags);
511 ed = ohci->periodic[i];
515 temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]);
531 u32 info = hc32_to_cpu (ohci, ed->hwINFO);
552 cpu_to_hc32(ohci, ED_H)) ?
574 spin_unlock_irqrestore (&ohci->lock, flags);
584 struct ohci_hcd *ohci;
591 ohci = buf->ohci;
592 hcd = ohci_to_hcd(ohci);
593 regs = ohci->regs;
597 spin_lock_irqsave (&ohci->lock, flags);
601 ohci_dbg_nosw(ohci, &next, &size,
616 ohci_dump_status(ohci, &next, &size);
619 if (ohci->hcca)
620 ohci_dbg_nosw(ohci, &next, &size,
621 "hcca frame 0x%04x\n", ohci_frame_no(ohci));
624 rdata = ohci_readl (ohci, ®s->fminterval);
632 rdata = ohci_readl (ohci, ®s->fmremaining);
639 rdata = ohci_readl (ohci, ®s->periodicstart);
645 rdata = ohci_readl (ohci, ®s->lsthresh);
652 HCD_POLL_RH(ohci_to_hcd(ohci)) ? "ON" : "off");
657 ohci_dump_roothub (ohci, 1, &next, &size);
660 spin_unlock_irqrestore (&ohci->lock, flags);
665 static struct debug_buffer *alloc_buffer(struct ohci_hcd *ohci,
673 buf->ohci = ohci;
762 static inline void create_debug_files (struct ohci_hcd *ohci)
764 struct usb_bus *bus = &ohci_to_hcd(ohci)->self;
768 ohci->debug_dir = root;
770 debugfs_create_file("async", S_IRUGO, root, ohci, &debug_async_fops);
771 debugfs_create_file("periodic", S_IRUGO, root, ohci,
773 debugfs_create_file("registers", S_IRUGO, root, ohci,
776 ohci_dbg (ohci, "created debug files\n");
779 static inline void remove_debug_files (struct ohci_hcd *ohci)
781 debugfs_remove_recursive(ohci->debug_dir);