Lines Matching refs:ohci
22 #define ohci_dbg_sw(ohci, next, size, format, arg...) \ argument
29 ohci_dbg(ohci,format, ## arg ); \
33 #define ohci_dbg_nosw(ohci, next, size, format, arg...) \ argument
42 struct ohci_hcd *ohci, in ohci_dump_intr_mask() argument
48 ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n", in ohci_dump_intr_mask()
64 struct ohci_hcd *ohci, in maybe_print_eds() argument
71 ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value); in maybe_print_eds()
85 static const char *rh_state_string(struct ohci_hcd *ohci) in rh_state_string() argument
87 switch (ohci->rh_state) { in rh_state_string()
254 static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label, in ohci_dump_td() argument
257 u32 tmp = hc32_to_cpup (ohci, &td->hwINFO); in ohci_dump_td()
259 ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n", in ohci_dump_td()
263 hc32_to_cpup (ohci, &td->hwNextTD)); in ohci_dump_td()
280 ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s\n", tmp, in ohci_dump_td()
284 cbp = hc32_to_cpup (ohci, &td->hwCBP); in ohci_dump_td()
285 be = hc32_to_cpup (ohci, &td->hwBE); in ohci_dump_td()
286 ohci_dbg (ohci, " cbp %08x be %08x (len %d)\n", cbp, be, in ohci_dump_td()
290 ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x\n", tmp, in ohci_dump_td()
295 ohci_dbg (ohci, " bp0 %08x be %08x\n", in ohci_dump_td()
296 hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff, in ohci_dump_td()
297 hc32_to_cpup (ohci, &td->hwBE)); in ohci_dump_td()
299 u16 psw = ohci_hwPSW (ohci, td, i); in ohci_dump_td()
301 ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d\n", i, in ohci_dump_td()
311 ohci_dump_ed (const struct ohci_hcd *ohci, const char *label, in ohci_dump_ed() argument
314 u32 tmp = hc32_to_cpu (ohci, ed->hwINFO); in ohci_dump_ed()
317 ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n", in ohci_dump_ed()
320 hc32_to_cpup (ohci, &ed->hwNextED)); in ohci_dump_ed()
326 ohci_dbg (ohci, in ohci_dump_ed()
336 tmp = hc32_to_cpup (ohci, &ed->hwHeadP); in ohci_dump_ed()
337 ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s\n", in ohci_dump_ed()
341 hc32_to_cpup (ohci, &ed->hwTailP), in ohci_dump_ed()
352 ohci_dump_td (ohci, " ->", td); in ohci_dump_ed()
392 struct ohci_hcd *ohci; member
399 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) in show_list() argument
412 u32 info = hc32_to_cpu (ohci, ed->hwINFO); in show_list()
413 u32 headp = hc32_to_cpu (ohci, ed->hwHeadP); in show_list()
436 info = hc32_to_cpup (ohci, &td->hwINFO); in show_list()
437 cbp = hc32_to_cpup (ohci, &td->hwCBP); in show_list()
438 be = hc32_to_cpup (ohci, &td->hwBE); in show_list()
466 struct ohci_hcd *ohci; in fill_async_buffer() local
470 ohci = buf->ohci; in fill_async_buffer()
474 spin_lock_irqsave (&ohci->lock, flags); in fill_async_buffer()
475 temp = show_list(ohci, buf->page, size, ohci->ed_controltail); in fill_async_buffer()
476 temp += show_list(ohci, buf->page + temp, size - temp, in fill_async_buffer()
477 ohci->ed_bulktail); in fill_async_buffer()
478 spin_unlock_irqrestore (&ohci->lock, flags); in fill_async_buffer()
487 struct ohci_hcd *ohci; in fill_periodic_buffer() local
499 ohci = buf->ohci; in fill_periodic_buffer()
508 spin_lock_irqsave (&ohci->lock, flags); in fill_periodic_buffer()
510 ed = ohci->periodic[i]; in fill_periodic_buffer()
514 temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]); in fill_periodic_buffer()
530 u32 info = hc32_to_cpu (ohci, ed->hwINFO); in fill_periodic_buffer()
551 cpu_to_hc32(ohci, ED_H)) ? in fill_periodic_buffer()
573 spin_unlock_irqrestore (&ohci->lock, flags); in fill_periodic_buffer()
583 struct ohci_hcd *ohci; in fill_registers_buffer() local
590 ohci = buf->ohci; in fill_registers_buffer()
591 hcd = ohci_to_hcd(ohci); in fill_registers_buffer()
592 regs = ohci->regs; in fill_registers_buffer()
596 spin_lock_irqsave (&ohci->lock, flags); in fill_registers_buffer()
600 ohci_dbg_nosw(ohci, &next, &size, in fill_registers_buffer()
615 ohci_dump_status(ohci, &next, &size); in fill_registers_buffer()
618 if (ohci->hcca) in fill_registers_buffer()
619 ohci_dbg_nosw(ohci, &next, &size, in fill_registers_buffer()
620 "hcca frame 0x%04x\n", ohci_frame_no(ohci)); in fill_registers_buffer()
623 rdata = ohci_readl (ohci, ®s->fminterval); in fill_registers_buffer()
631 rdata = ohci_readl (ohci, ®s->fmremaining); in fill_registers_buffer()
638 rdata = ohci_readl (ohci, ®s->periodicstart); in fill_registers_buffer()
644 rdata = ohci_readl (ohci, ®s->lsthresh); in fill_registers_buffer()
651 HCD_POLL_RH(ohci_to_hcd(ohci)) ? "ON" : "off"); in fill_registers_buffer()
656 ohci_dump_roothub (ohci, 1, &next, &size); in fill_registers_buffer()
659 spin_unlock_irqrestore (&ohci->lock, flags); in fill_registers_buffer()
664 static struct debug_buffer *alloc_buffer(struct ohci_hcd *ohci, in alloc_buffer() argument
672 buf->ohci = ohci; in alloc_buffer()
761 static inline void create_debug_files (struct ohci_hcd *ohci) in create_debug_files() argument
763 struct usb_bus *bus = &ohci_to_hcd(ohci)->self; in create_debug_files()
765 ohci->debug_dir = debugfs_create_dir(bus->bus_name, ohci_debug_root); in create_debug_files()
766 if (!ohci->debug_dir) in create_debug_files()
769 ohci->debug_async = debugfs_create_file("async", S_IRUGO, in create_debug_files()
770 ohci->debug_dir, ohci, in create_debug_files()
772 if (!ohci->debug_async) in create_debug_files()
775 ohci->debug_periodic = debugfs_create_file("periodic", S_IRUGO, in create_debug_files()
776 ohci->debug_dir, ohci, in create_debug_files()
778 if (!ohci->debug_periodic) in create_debug_files()
781 ohci->debug_registers = debugfs_create_file("registers", S_IRUGO, in create_debug_files()
782 ohci->debug_dir, ohci, in create_debug_files()
784 if (!ohci->debug_registers) in create_debug_files()
787 ohci_dbg (ohci, "created debug files\n"); in create_debug_files()
791 debugfs_remove(ohci->debug_periodic); in create_debug_files()
793 debugfs_remove(ohci->debug_async); in create_debug_files()
795 debugfs_remove(ohci->debug_dir); in create_debug_files()
797 ohci->debug_periodic = NULL; in create_debug_files()
798 ohci->debug_async = NULL; in create_debug_files()
799 ohci->debug_dir = NULL; in create_debug_files()
802 static inline void remove_debug_files (struct ohci_hcd *ohci) in remove_debug_files() argument
804 debugfs_remove(ohci->debug_registers); in remove_debug_files()
805 debugfs_remove(ohci->debug_periodic); in remove_debug_files()
806 debugfs_remove(ohci->debug_async); in remove_debug_files()
807 debugfs_remove(ohci->debug_dir); in remove_debug_files()