Lines Matching refs:uhci
43 static int uhci_show_td(struct uhci_hcd *uhci, struct uhci_td *td, char *buf, in uhci_show_td() argument
50 status = td_status(uhci, td); in uhci_show_td()
52 hc32_to_cpu(uhci, td->link)); in uhci_show_td()
69 token = td_token(uhci, td); in uhci_show_td()
92 out += sprintf(out, "(buf=%08x)\n", hc32_to_cpu(uhci, td->buffer)); in uhci_show_td()
100 static int uhci_show_urbp(struct uhci_hcd *uhci, struct urb_priv *urbp, in uhci_show_urbp() argument
143 out += uhci_show_td(uhci, td, out, in uhci_show_urbp()
148 if (td_status(uhci, td) & TD_CTRL_ACTIVE) in uhci_show_urbp()
165 static int uhci_show_qh(struct uhci_hcd *uhci, in uhci_show_qh() argument
183 hc32_to_cpu(uhci, qh->link), in uhci_show_qh()
184 hc32_to_cpu(uhci, element)); in uhci_show_qh()
196 if (element & UHCI_PTR_QH(uhci)) in uhci_show_qh()
199 if (element & UHCI_PTR_DEPTH(uhci)) in uhci_show_qh()
202 if (element & cpu_to_hc32(uhci, 8)) in uhci_show_qh()
205 if (!(element & ~(UHCI_PTR_QH(uhci) | UHCI_PTR_DEPTH(uhci)))) in uhci_show_qh()
213 if (qh == uhci->skel_async_qh) { in uhci_show_qh()
214 out += uhci_show_td(uhci, uhci->term_td, out, in uhci_show_qh()
225 if (element != LINK_TO_TD(uhci, td)) in uhci_show_qh()
231 out += uhci_show_urbp(uhci, urbp, out, in uhci_show_qh()
249 out += uhci_show_td(uhci, qh->dummy_td, out, in uhci_show_qh()
279 static int uhci_show_root_hub_state(struct uhci_hcd *uhci, char *buf) in uhci_show_root_hub_state() argument
283 switch (uhci->rh_state) { in uhci_show_root_hub_state()
302 rh_state, uhci->fsbr_is_on); in uhci_show_root_hub_state()
305 static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len) in uhci_show_status() argument
314 usbcmd = uhci_readw(uhci, USBCMD); in uhci_show_status()
315 usbstat = uhci_readw(uhci, USBSTS); in uhci_show_status()
316 usbint = uhci_readw(uhci, USBINTR); in uhci_show_status()
317 usbfrnum = uhci_readw(uhci, USBFRNUM); in uhci_show_status()
318 flbaseadd = uhci_readl(uhci, USBFLBASEADD); in uhci_show_status()
319 sof = uhci_readb(uhci, USBSOF); in uhci_show_status()
320 portsc1 = uhci_readw(uhci, USBPORTSC1); in uhci_show_status()
321 portsc2 = uhci_readw(uhci, USBPORTSC2); in uhci_show_status()
365 uhci->frame_number, uhci->frame_number & 1023, in uhci_show_status()
366 uhci->last_iso_frame, uhci->last_iso_frame & 1023); in uhci_show_status()
374 static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len) in uhci_sprint_schedule() argument
390 out += uhci_show_root_hub_state(uhci, out); in uhci_sprint_schedule()
394 out += uhci_show_status(uhci, out, len - (out - buf)); in uhci_sprint_schedule()
400 out += sprintf(out, "\t%d", uhci->load[i]); in uhci_sprint_schedule()
405 uhci->total_load, in uhci_sprint_schedule()
406 uhci_to_hcd(uhci)->self.bandwidth_int_reqs, in uhci_sprint_schedule()
407 uhci_to_hcd(uhci)->self.bandwidth_isoc_reqs); in uhci_sprint_schedule()
420 td = uhci->frame_cpu[i]; in uhci_sprint_schedule()
421 link = uhci->frame[i]; in uhci_sprint_schedule()
427 i, hc32_to_cpu(uhci, link)); in uhci_sprint_schedule()
436 if (link != LINK_TO_TD(uhci, td)) { in uhci_sprint_schedule()
446 out += uhci_show_td(uhci, td, out, in uhci_sprint_schedule()
455 qh_dma = uhci_frame_skel_link(uhci, i); in uhci_sprint_schedule()
461 i, hc32_to_cpu(uhci, link)); in uhci_sprint_schedule()
466 hc32_to_cpu(uhci, qh_dma)); in uhci_sprint_schedule()
486 qh = uhci->skelqh[i]; in uhci_sprint_schedule()
488 out += uhci_show_qh(uhci, qh, out, len - (out - buf), 4); in uhci_sprint_schedule()
494 if (qh_element(qh) != LINK_TO_TD(uhci, uhci->term_td)) { in uhci_sprint_schedule()
502 link = LINK_TO_QH(uhci, uhci->skel_term_qh); in uhci_sprint_schedule()
513 out += uhci_show_qh(uhci, qh, out, in uhci_sprint_schedule()
519 fsbr_link = LINK_TO_QH(uhci, qh); in uhci_sprint_schedule()
524 link = UHCI_PTR_TERM(uhci); in uhci_sprint_schedule()
528 link = LINK_TO_QH(uhci, uhci->skel_async_qh); in uhci_sprint_schedule()
529 else if (!uhci->fsbr_is_on) in uhci_sprint_schedule()
532 link = LINK_TO_QH(uhci, uhci->skel_term_qh); in uhci_sprint_schedule()
560 struct uhci_hcd *uhci = inode->i_private; in uhci_debug_open() local
575 spin_lock_irqsave(&uhci->lock, flags); in uhci_debug_open()
576 if (uhci->is_initialized) in uhci_debug_open()
577 up->size = uhci_sprint_schedule(uhci, up->data, in uhci_debug_open()
579 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_debug_open()
625 static inline int uhci_show_qh(struct uhci_hcd *uhci, in uhci_show_qh() argument
631 static inline int uhci_sprint_schedule(struct uhci_hcd *uhci, in uhci_sprint_schedule() argument