Lines Matching full:ohci

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