Lines Matching refs:ohci

75 #define ohci_dbg_sw(ohci, next, size, format, arg...) \
82 ohci_dbg(ohci,format, ## arg ); \
86 #define ohci_dbg_nosw(ohci, next, size, format, arg...) \
95 struct ohci_hcd *ohci,
101 ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n",
117 struct ohci_hcd *ohci,
124 ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value);
138 static const char *rh_state_string(struct ohci_hcd *ohci)
140 switch (ohci->rh_state) {
307 static void ohci_dump_td (const struct ohci_hcd *ohci, const char *label,
310 u32 tmp = hc32_to_cpup (ohci, &td->hwINFO);
312 ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x\n",
316 hc32_to_cpup (ohci, &td->hwNextTD));
333 ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s\n", tmp,
337 cbp = hc32_to_cpup (ohci, &td->hwCBP);
338 be = hc32_to_cpup (ohci, &td->hwBE);
339 ohci_dbg (ohci, " cbp %08x be %08x (len %d)\n", cbp, be,
343 ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x\n", tmp,
348 ohci_dbg (ohci, " bp0 %08x be %08x\n",
349 hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff,
350 hc32_to_cpup (ohci, &td->hwBE));
352 u16 psw = ohci_hwPSW (ohci, td, i);
354 ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d\n", i,
364 ohci_dump_ed (const struct ohci_hcd *ohci, const char *label,
367 u32 tmp = hc32_to_cpu (ohci, ed->hwINFO);
370 ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x\n",
373 hc32_to_cpup (ohci, &ed->hwNextED));
379 ohci_dbg (ohci,
389 tmp = hc32_to_cpup (ohci, &ed->hwHeadP);
390 ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s\n",
394 hc32_to_cpup (ohci, &ed->hwTailP),
405 ohci_dump_td (ohci, " ->", td);
459 struct ohci_hcd *ohci;
466 show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
479 u32 info = hc32_to_cpu (ohci, ed->hwINFO);
480 u32 headp = hc32_to_cpu (ohci, ed->hwHeadP);
503 info = hc32_to_cpup (ohci, &td->hwINFO);
504 cbp = hc32_to_cpup (ohci, &td->hwCBP);
505 be = hc32_to_cpup (ohci, &td->hwBE);
533 struct ohci_hcd *ohci;
537 ohci = buf->ohci;
540 spin_lock_irqsave (&ohci->lock, flags);
541 temp = show_list(ohci, buf->page, buf->count, ohci->ed_controltail);
542 temp += show_list(ohci, buf->page + temp, buf->count - temp,
543 ohci->ed_bulktail);
544 spin_unlock_irqrestore (&ohci->lock, flags);
553 struct ohci_hcd *ohci;
564 ohci = buf->ohci;
573 spin_lock_irqsave (&ohci->lock, flags);
575 if (!(ed = ohci->periodic [i]))
578 temp = scnprintf (next, size, "%2d [%3d]:", i, ohci->load [i]);
594 u32 info = hc32_to_cpu (ohci, ed->hwINFO);
615 cpu_to_hc32(ohci, ED_H)) ?
637 spin_unlock_irqrestore (&ohci->lock, flags);
647 struct ohci_hcd *ohci;
654 ohci = buf->ohci;
655 hcd = ohci_to_hcd(ohci);
656 regs = ohci->regs;
660 spin_lock_irqsave (&ohci->lock, flags);
664 ohci_dbg_nosw(ohci, &next, &size,
679 ohci_dump_status(ohci, &next, &size);
682 if (ohci->hcca)
683 ohci_dbg_nosw(ohci, &next, &size,
684 "hcca frame 0x%04x\n", ohci_frame_no(ohci));
687 rdata = ohci_readl (ohci, &regs->fminterval);
695 rdata = ohci_readl (ohci, &regs->fmremaining);
702 rdata = ohci_readl (ohci, &regs->periodicstart);
708 rdata = ohci_readl (ohci, &regs->lsthresh);
715 HCD_POLL_RH(ohci_to_hcd(ohci)) ? "ON" : "off");
720 ohci_dump_roothub (ohci, 1, &next, &size);
723 spin_unlock_irqrestore (&ohci->lock, flags);
728 static struct debug_buffer *alloc_buffer(struct ohci_hcd *ohci,
736 buf->ohci = ohci;
825 static inline void create_debug_files (struct ohci_hcd *ohci)
827 struct usb_bus *bus = &ohci_to_hcd(ohci)->self;
829 ohci->debug_dir = debugfs_create_dir(bus->bus_name, ohci_debug_root);
830 if (!ohci->debug_dir)
833 ohci->debug_async = debugfs_create_file("async", S_IRUGO,
834 ohci->debug_dir, ohci,
836 if (!ohci->debug_async)
839 ohci->debug_periodic = debugfs_create_file("periodic", S_IRUGO,
840 ohci->debug_dir, ohci,
842 if (!ohci->debug_periodic)
845 ohci->debug_registers = debugfs_create_file("registers", S_IRUGO,
846 ohci->debug_dir, ohci,
848 if (!ohci->debug_registers)
851 ohci_dbg (ohci, "created debug files\n");
855 debugfs_remove(ohci->debug_periodic);
857 debugfs_remove(ohci->debug_async);
859 debugfs_remove(ohci->debug_dir);
861 ohci->debug_periodic = NULL;
862 ohci->debug_async = NULL;
863 ohci->debug_dir = NULL;
866 static inline void remove_debug_files (struct ohci_hcd *ohci)
868 debugfs_remove(ohci->debug_registers);
869 debugfs_remove(ohci->debug_periodic);
870 debugfs_remove(ohci->debug_async);
871 debugfs_remove(ohci->debug_dir);