Searched refs:oxu (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/drivers/usb/host/
H A Doxu210hp-hcd.c55 #define oxu_dbg(oxu, fmt, args...) \
56 dev_dbg(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
57 #define oxu_err(oxu, fmt, args...) \
58 dev_err(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
59 #define oxu_info(oxu, fmt, args...) \
60 dev_info(oxu_to_hcd(oxu)->self.controller , fmt , ## args)
66 static inline struct usb_hcd *oxu_to_hcd(struct oxu_hcd *oxu) oxu_to_hcd() argument
68 return container_of((void *) oxu, struct usb_hcd, hcd_priv); oxu_to_hcd()
86 #define oxu_vdbg(oxu, fmt, args...) /* Nop */
205 #define dbg_status(oxu, label, status) { \
208 oxu_dbg(oxu, "%s\n", _buf); \
211 #define dbg_cmd(oxu, label, command) { \
214 oxu_dbg(oxu, "%s\n", _buf); \
217 #define dbg_port(oxu, label, port, status) { \
220 oxu_dbg(oxu, "%s\n", _buf); \
243 static void ehci_work(struct oxu_hcd *oxu);
263 static inline void timer_action_done(struct oxu_hcd *oxu, timer_action_done() argument
266 clear_bit(action, &oxu->actions); timer_action_done()
269 static inline void timer_action(struct oxu_hcd *oxu, timer_action() argument
272 if (!test_and_set_bit(action, &oxu->actions)) { timer_action()
297 && t > oxu->watchdog.expires timer_action()
298 && timer_pending(&oxu->watchdog)) timer_action()
300 mod_timer(&oxu->watchdog, t); timer_action()
321 static int handshake(struct oxu_hcd *oxu, void __iomem *ptr, handshake() argument
340 static int ehci_halt(struct oxu_hcd *oxu) ehci_halt() argument
342 u32 temp = readl(&oxu->regs->status); ehci_halt()
345 writel(0, &oxu->regs->intr_enable); ehci_halt()
350 temp = readl(&oxu->regs->command); ehci_halt()
352 writel(temp, &oxu->regs->command); ehci_halt()
353 return handshake(oxu, &oxu->regs->status, ehci_halt()
358 static void tdi_reset(struct oxu_hcd *oxu) tdi_reset() argument
363 reg_ptr = (u32 __iomem *)(((u8 __iomem *)oxu->regs) + 0x68); tdi_reset()
370 static int ehci_reset(struct oxu_hcd *oxu) ehci_reset() argument
373 u32 command = readl(&oxu->regs->command); ehci_reset()
376 dbg_cmd(oxu, "reset", command); ehci_reset()
377 writel(command, &oxu->regs->command); ehci_reset()
378 oxu_to_hcd(oxu)->state = HC_STATE_HALT; ehci_reset()
379 oxu->next_statechange = jiffies; ehci_reset()
380 retval = handshake(oxu, &oxu->regs->command, ehci_reset()
386 tdi_reset(oxu); ehci_reset()
392 static void ehci_quiesce(struct oxu_hcd *oxu) ehci_quiesce() argument
397 if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state)) ehci_quiesce()
402 temp = readl(&oxu->regs->command) << 10; ehci_quiesce()
404 if (handshake(oxu, &oxu->regs->status, STS_ASS | STS_PSS, ehci_quiesce()
406 oxu_to_hcd(oxu)->state = HC_STATE_HALT; ehci_quiesce()
411 temp = readl(&oxu->regs->command); ehci_quiesce()
413 writel(temp, &oxu->regs->command); ehci_quiesce()
416 if (handshake(oxu, &oxu->regs->status, STS_ASS | STS_PSS, ehci_quiesce()
418 oxu_to_hcd(oxu)->state = HC_STATE_HALT; ehci_quiesce()
423 static int check_reset_complete(struct oxu_hcd *oxu, int index, check_reset_complete() argument
427 oxu->reset_done[index] = 0; check_reset_complete()
433 oxu_dbg(oxu, "Failed to enable port %d on root hub TT\n", check_reset_complete()
437 oxu_dbg(oxu, "port %d high speed\n", index + 1); check_reset_complete()
442 static void ehci_hub_descriptor(struct oxu_hcd *oxu, ehci_hub_descriptor() argument
445 int ports = HCS_N_PORTS(oxu->hcs_params); ehci_hub_descriptor()
449 desc->bPwrOn2PwrGood = 10; /* oxu 1.0, 2.3.9 says 20ms max */ ehci_hub_descriptor()
461 if (HCS_PPC(oxu->hcs_params)) ehci_hub_descriptor()
483 static int oxu_buf_alloc(struct oxu_hcd *oxu, struct ehci_qtd *qtd, int len) oxu_buf_alloc() argument
491 oxu_err(oxu, "buffer too big (%d)\n", len); oxu_buf_alloc()
495 spin_lock(&oxu->mem_lock); oxu_buf_alloc()
506 i += max(a_blocks, (int)oxu->db_used[i])) { oxu_buf_alloc()
510 if (oxu->db_used[i + j]) oxu_buf_alloc()
517 qtd->buffer = (void *) &oxu->mem->db_pool[i]; oxu_buf_alloc()
521 oxu->db_used[i] = a_blocks; oxu_buf_alloc()
523 spin_unlock(&oxu->mem_lock); oxu_buf_alloc()
530 spin_unlock(&oxu->mem_lock); oxu_buf_alloc()
535 static void oxu_buf_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd) oxu_buf_free() argument
539 spin_lock(&oxu->mem_lock); oxu_buf_free()
541 index = (qtd->buffer - (void *) &oxu->mem->db_pool[0]) oxu_buf_free()
543 oxu->db_used[index] = 0; oxu_buf_free()
548 spin_unlock(&oxu->mem_lock); oxu_buf_free()
561 static inline void oxu_qtd_free(struct oxu_hcd *oxu, struct ehci_qtd *qtd) oxu_qtd_free() argument
566 oxu_buf_free(oxu, qtd); oxu_qtd_free()
568 spin_lock(&oxu->mem_lock); oxu_qtd_free()
570 index = qtd - &oxu->mem->qtd_pool[0]; oxu_qtd_free()
571 oxu->qtd_used[index] = 0; oxu_qtd_free()
573 spin_unlock(&oxu->mem_lock); oxu_qtd_free()
576 static struct ehci_qtd *ehci_qtd_alloc(struct oxu_hcd *oxu) ehci_qtd_alloc() argument
581 spin_lock(&oxu->mem_lock); ehci_qtd_alloc()
584 if (!oxu->qtd_used[i]) ehci_qtd_alloc()
588 qtd = (struct ehci_qtd *) &oxu->mem->qtd_pool[i]; ehci_qtd_alloc()
598 oxu->qtd_used[i] = 1; ehci_qtd_alloc()
601 spin_unlock(&oxu->mem_lock); ehci_qtd_alloc()
606 static void oxu_qh_free(struct oxu_hcd *oxu, struct ehci_qh *qh) oxu_qh_free() argument
610 spin_lock(&oxu->mem_lock); oxu_qh_free()
612 index = qh - &oxu->mem->qh_pool[0]; oxu_qh_free()
613 oxu->qh_used[index] = 0; oxu_qh_free()
615 spin_unlock(&oxu->mem_lock); oxu_qh_free()
621 struct oxu_hcd *oxu = qh->oxu; qh_destroy() local
625 oxu_dbg(oxu, "unused qh not empty!\n"); qh_destroy()
629 oxu_qtd_free(oxu, qh->dummy); qh_destroy()
630 oxu_qh_free(oxu, qh); qh_destroy()
633 static struct ehci_qh *oxu_qh_alloc(struct oxu_hcd *oxu) oxu_qh_alloc() argument
638 spin_lock(&oxu->mem_lock); oxu_qh_alloc()
641 if (!oxu->qh_used[i]) oxu_qh_alloc()
645 qh = (struct ehci_qh *) &oxu->mem->qh_pool[i]; oxu_qh_alloc()
649 qh->oxu = oxu; oxu_qh_alloc()
654 qh->dummy = ehci_qtd_alloc(oxu); oxu_qh_alloc()
656 oxu_dbg(oxu, "no dummy td\n"); oxu_qh_alloc()
657 oxu->qh_used[i] = 0; oxu_qh_alloc()
662 oxu->qh_used[i] = 1; oxu_qh_alloc()
665 spin_unlock(&oxu->mem_lock); oxu_qh_alloc()
682 static void oxu_murb_free(struct oxu_hcd *oxu, struct oxu_murb *murb) oxu_murb_free() argument
686 spin_lock(&oxu->mem_lock); oxu_murb_free()
688 index = murb - &oxu->murb_pool[0]; oxu_murb_free()
689 oxu->murb_used[index] = 0; oxu_murb_free()
691 spin_unlock(&oxu->mem_lock); oxu_murb_free()
694 static struct oxu_murb *oxu_murb_alloc(struct oxu_hcd *oxu) oxu_murb_alloc() argument
700 spin_lock(&oxu->mem_lock); oxu_murb_alloc()
703 if (!oxu->murb_used[i]) oxu_murb_alloc()
707 murb = &(oxu->murb_pool)[i]; oxu_murb_alloc()
709 oxu->murb_used[i] = 1; oxu_murb_alloc()
712 spin_unlock(&oxu->mem_lock); oxu_murb_alloc()
721 static void ehci_mem_cleanup(struct oxu_hcd *oxu) ehci_mem_cleanup() argument
723 kfree(oxu->murb_pool); ehci_mem_cleanup()
724 oxu->murb_pool = NULL; ehci_mem_cleanup()
726 if (oxu->async) ehci_mem_cleanup()
727 qh_put(oxu->async); ehci_mem_cleanup()
728 oxu->async = NULL; ehci_mem_cleanup()
730 del_timer(&oxu->urb_timer); ehci_mem_cleanup()
732 oxu->periodic = NULL; ehci_mem_cleanup()
735 kfree(oxu->pshadow); ehci_mem_cleanup()
736 oxu->pshadow = NULL; ehci_mem_cleanup()
741 static int ehci_mem_init(struct oxu_hcd *oxu, gfp_t flags) ehci_mem_init() argument
745 for (i = 0; i < oxu->periodic_size; i++) ehci_mem_init()
746 oxu->mem->frame_list[i] = EHCI_LIST_END; ehci_mem_init()
748 oxu->qh_used[i] = 0; ehci_mem_init()
750 oxu->qtd_used[i] = 0; ehci_mem_init()
752 oxu->murb_pool = kcalloc(MURB_NUM, sizeof(struct oxu_murb), flags); ehci_mem_init()
753 if (!oxu->murb_pool) ehci_mem_init()
757 oxu->murb_used[i] = 0; ehci_mem_init()
759 oxu->async = oxu_qh_alloc(oxu); ehci_mem_init()
760 if (!oxu->async) ehci_mem_init()
763 oxu->periodic = (__le32 *) &oxu->mem->frame_list; ehci_mem_init()
764 oxu->periodic_dma = virt_to_phys(oxu->periodic); ehci_mem_init()
766 for (i = 0; i < oxu->periodic_size; i++) ehci_mem_init()
767 oxu->periodic[i] = EHCI_LIST_END; ehci_mem_init()
770 oxu->pshadow = kcalloc(oxu->periodic_size, sizeof(void *), flags); ehci_mem_init()
771 if (oxu->pshadow != NULL) ehci_mem_init()
775 oxu_dbg(oxu, "couldn't init memory\n"); ehci_mem_init()
776 ehci_mem_cleanup(oxu); ehci_mem_init()
820 static inline void qh_update(struct oxu_hcd *oxu, qh_update() argument
854 static void qh_refresh(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_refresh() argument
869 qh_update(oxu, qh, qtd); qh_refresh()
872 static void qtd_copy_status(struct oxu_hcd *oxu, struct urb *urb, qtd_copy_status() argument
904 oxu_dbg(oxu, "devpath %s ep%d%s 3strikes\n", qtd_copy_status()
916 oxu_vdbg(oxu, "dev%d ep%d%s qtd token %08x --> status %d\n", qtd_copy_status()
924 static void ehci_urb_done(struct oxu_hcd *oxu, struct urb *urb)
925 __releases(oxu->lock)
926 __acquires(oxu->lock)
935 oxu_to_hcd(oxu)->self.bandwidth_int_reqs--;
956 oxu_dbg(oxu, "%s %s urb %p ep%d%s status %d len %d/%d\n",
965 spin_unlock(&oxu->lock);
966 usb_hcd_giveback_urb(oxu_to_hcd(oxu), urb, urb->status);
967 spin_lock(&oxu->lock);
970 static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh);
971 static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh);
973 static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
974 static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh);
982 static unsigned qh_completions(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_completions() argument
1025 ehci_urb_done(oxu, last->urb); qh_completions()
1028 oxu_murb_free(oxu, murb); qh_completions()
1030 ehci_urb_done(oxu, last->urb); qh_completions()
1034 oxu_qtd_free(oxu, last); qh_completions()
1063 HC_IS_RUNNING(oxu_to_hcd(oxu)->state))) { qh_completions()
1069 if (unlikely(!HC_IS_RUNNING(oxu_to_hcd(oxu)->state))) qh_completions()
1104 qtd_copy_status(oxu, urb->complete ? qh_completions()
1128 ehci_urb_done(oxu, last->urb); qh_completions()
1131 oxu_murb_free(oxu, murb); qh_completions()
1133 ehci_urb_done(oxu, last->urb); qh_completions()
1136 oxu_qtd_free(oxu, last); qh_completions()
1149 qh_refresh(oxu, qh); qh_completions()
1157 intr_deschedule(oxu, qh); qh_completions()
1158 (void) qh_schedule(oxu, qh); qh_completions()
1160 unlink_async(oxu, qh); qh_completions()
1177 static void qtd_list_free(struct oxu_hcd *oxu, qtd_list_free() argument
1187 oxu_qtd_free(oxu, qtd); list_for_each_safe()
1193 static struct list_head *qh_urb_transaction(struct oxu_hcd *oxu, qh_urb_transaction() argument
1209 qtd = ehci_qtd_alloc(oxu); qh_urb_transaction()
1226 ret = oxu_buf_alloc(oxu, qtd, sizeof(struct usb_ctrlrequest)); qh_urb_transaction()
1238 qtd = ehci_qtd_alloc(oxu); qh_urb_transaction()
1254 ret = oxu_buf_alloc(oxu, qtd, len); qh_urb_transaction()
1284 qtd->hw_alt_next = oxu->async->hw_alt_next; qh_urb_transaction()
1294 qtd = ehci_qtd_alloc(oxu); qh_urb_transaction()
1298 ret = oxu_buf_alloc(oxu, qtd, len); qh_urb_transaction()
1332 qtd = ehci_qtd_alloc(oxu); qh_urb_transaction()
1349 qtd_list_free(oxu, urb, head); qh_urb_transaction()
1360 static struct ehci_qh *qh_make(struct oxu_hcd *oxu, qh_make() argument
1363 struct ehci_qh *qh = oxu_qh_alloc(oxu); qh_make()
1405 oxu_dbg(oxu, "intr period %d uframes, NYET!\n", qh_make()
1477 oxu_dbg(oxu, "bogus dev %p speed %d\n", urb->dev, urb->dev->speed); qh_make()
1490 qh_refresh(oxu, qh); qh_make()
1496 static void qh_link_async(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_link_async() argument
1502 head = oxu->async; qh_link_async()
1503 timer_action_done(oxu, TIMER_ASYNC_OFF); qh_link_async()
1505 u32 cmd = readl(&oxu->regs->command); qh_link_async()
1509 (void)handshake(oxu, &oxu->regs->status, qh_link_async()
1512 writel(cmd, &oxu->regs->command); qh_link_async()
1513 oxu_to_hcd(oxu)->state = HC_STATE_RUNNING; qh_link_async()
1520 qh_refresh(oxu, qh); qh_link_async()
1542 static struct ehci_qh *qh_append_tds(struct oxu_hcd *oxu, qh_append_tds() argument
1550 /* can't sleep here, we have oxu->lock... */ qh_append_tds()
1551 qh = qh_make(oxu, urb, GFP_ATOMIC); qh_append_tds()
1617 static int submit_async(struct oxu_hcd *oxu, struct urb *urb, submit_async() argument
1630 oxu_dbg(oxu, "%s %s urb %p ep%d%s len %d, qtd %p [qh %p]\n", submit_async()
1637 spin_lock_irqsave(&oxu->lock, flags); submit_async()
1638 if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) { submit_async()
1643 qh = qh_append_tds(oxu, urb, qtd_list, epnum, &urb->ep->hcpriv); submit_async()
1653 qh_link_async(oxu, qh_get(qh)); submit_async()
1655 spin_unlock_irqrestore(&oxu->lock, flags); submit_async()
1657 qtd_list_free(oxu, urb, qtd_list); submit_async()
1663 static void end_unlink_async(struct oxu_hcd *oxu) end_unlink_async() argument
1665 struct ehci_qh *qh = oxu->reclaim; end_unlink_async()
1668 timer_action_done(oxu, TIMER_IAA_WATCHDOG); end_unlink_async()
1676 oxu->reclaim = next; end_unlink_async()
1677 oxu->reclaim_ready = 0; end_unlink_async()
1680 qh_completions(oxu, qh); end_unlink_async()
1683 && HC_IS_RUNNING(oxu_to_hcd(oxu)->state)) end_unlink_async()
1684 qh_link_async(oxu, qh); end_unlink_async()
1691 if (HC_IS_RUNNING(oxu_to_hcd(oxu)->state) end_unlink_async()
1692 && oxu->async->qh_next.qh == NULL) end_unlink_async()
1693 timer_action(oxu, TIMER_ASYNC_OFF); end_unlink_async()
1697 oxu->reclaim = NULL; end_unlink_async()
1698 start_unlink_async(oxu, next); end_unlink_async()
1703 /* caller must own oxu->lock */
1705 static void start_unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh) start_unlink_async() argument
1707 int cmd = readl(&oxu->regs->command); start_unlink_async()
1711 assert_spin_locked(&oxu->lock); start_unlink_async()
1712 if (oxu->reclaim || (qh->qh_state != QH_STATE_LINKED start_unlink_async()
1718 if (unlikely(qh == oxu->async)) { start_unlink_async()
1720 if (oxu_to_hcd(oxu)->state != HC_STATE_HALT start_unlink_async()
1721 && !oxu->reclaim) { start_unlink_async()
1723 writel(cmd & ~CMD_ASE, &oxu->regs->command); start_unlink_async()
1726 timer_action_done(oxu, TIMER_ASYNC_OFF); start_unlink_async()
1732 oxu->reclaim = qh = qh_get(qh); start_unlink_async()
1734 prev = oxu->async; start_unlink_async()
1742 if (unlikely(oxu_to_hcd(oxu)->state == HC_STATE_HALT)) { start_unlink_async()
1746 end_unlink_async(oxu); start_unlink_async()
1750 oxu->reclaim_ready = 0; start_unlink_async()
1752 writel(cmd, &oxu->regs->command); start_unlink_async()
1753 (void) readl(&oxu->regs->command); start_unlink_async()
1754 timer_action(oxu, TIMER_IAA_WATCHDOG); start_unlink_async()
1757 static void scan_async(struct oxu_hcd *oxu) scan_async() argument
1762 if (!++(oxu->stamp)) scan_async()
1763 oxu->stamp++; scan_async()
1764 timer_action_done(oxu, TIMER_ASYNC_SHRINK); scan_async()
1766 qh = oxu->async->qh_next.qh; scan_async()
1771 && qh->stamp != oxu->stamp) { scan_async()
1780 qh->stamp = oxu->stamp; scan_async()
1781 temp = qh_completions(oxu, qh); scan_async()
1794 if (qh->stamp == oxu->stamp) scan_async()
1796 else if (!oxu->reclaim scan_async()
1798 start_unlink_async(oxu, qh); scan_async()
1805 timer_action(oxu, TIMER_ASYNC_SHRINK); scan_async()
1823 /* caller must hold oxu->lock */ periodic_unlink()
1824 static void periodic_unlink(struct oxu_hcd *oxu, unsigned frame, void *ptr) periodic_unlink() argument
1826 union ehci_shadow *prev_p = &oxu->pshadow[frame]; periodic_unlink()
1827 __le32 *hw_p = &oxu->periodic[frame]; periodic_unlink()
1848 static unsigned short periodic_usecs(struct oxu_hcd *oxu, periodic_usecs() argument
1851 __le32 *hw_p = &oxu->periodic[frame]; periodic_usecs()
1852 union ehci_shadow *q = &oxu->pshadow[frame]; periodic_usecs()
1872 oxu_err(oxu, "uframe %d sched overrun: %d usecs\n", periodic_usecs()
1878 static int enable_periodic(struct oxu_hcd *oxu) enable_periodic() argument
1886 status = handshake(oxu, &oxu->regs->status, STS_PSS, 0, 9 * 125); enable_periodic()
1888 oxu_to_hcd(oxu)->state = HC_STATE_HALT; enable_periodic()
1889 usb_hc_died(oxu_to_hcd(oxu)); enable_periodic()
1893 cmd = readl(&oxu->regs->command) | CMD_PSE; enable_periodic()
1894 writel(cmd, &oxu->regs->command); enable_periodic()
1896 oxu_to_hcd(oxu)->state = HC_STATE_RUNNING; enable_periodic()
1899 oxu->next_uframe = readl(&oxu->regs->frame_index) enable_periodic()
1900 % (oxu->periodic_size << 3); enable_periodic()
1904 static int disable_periodic(struct oxu_hcd *oxu) disable_periodic() argument
1912 status = handshake(oxu, &oxu->regs->status, STS_PSS, STS_PSS, 9 * 125); disable_periodic()
1914 oxu_to_hcd(oxu)->state = HC_STATE_HALT; disable_periodic()
1915 usb_hc_died(oxu_to_hcd(oxu)); disable_periodic()
1919 cmd = readl(&oxu->regs->command) & ~CMD_PSE; disable_periodic()
1920 writel(cmd, &oxu->regs->command); disable_periodic()
1923 oxu->next_uframe = -1; disable_periodic()
1931 * no FSTN support (yet; oxu 0.96+)
1933 static int qh_link_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_link_periodic() argument
1947 for (i = qh->start; i < oxu->periodic_size; i += period) { qh_link_periodic()
1948 union ehci_shadow *prev = &oxu->pshadow[i]; qh_link_periodic()
1949 __le32 *hw_p = &oxu->periodic[i]; qh_link_periodic()
1987 oxu_to_hcd(oxu)->self.bandwidth_allocated += qh->period qh_link_periodic()
1992 if (!oxu->periodic_sched++) qh_link_periodic()
1993 return enable_periodic(oxu); qh_link_periodic()
1998 static void qh_unlink_periodic(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_unlink_periodic() argument
2016 for (i = qh->start; i < oxu->periodic_size; i += period) qh_unlink_periodic()
2017 periodic_unlink(oxu, i, qh); qh_unlink_periodic()
2020 oxu_to_hcd(oxu)->self.bandwidth_allocated -= qh->period qh_unlink_periodic()
2036 oxu->periodic_sched--; qh_unlink_periodic()
2037 if (!oxu->periodic_sched) qh_unlink_periodic()
2038 (void) disable_periodic(oxu); qh_unlink_periodic()
2041 static void intr_deschedule(struct oxu_hcd *oxu, struct ehci_qh *qh) intr_deschedule() argument
2045 qh_unlink_periodic(oxu, qh); intr_deschedule()
2064 static int check_period(struct oxu_hcd *oxu, check_period() argument
2088 claimed = periodic_usecs(oxu, frame, uframe); check_period()
2092 } while ((frame += 1) < oxu->periodic_size); check_period()
2097 claimed = periodic_usecs(oxu, frame, uframe); check_period()
2100 } while ((frame += period) < oxu->periodic_size); check_period()
2106 static int check_intr_schedule(struct oxu_hcd *oxu, check_intr_schedule() argument
2115 if (!check_period(oxu, frame, uframe, qh->period, qh->usecs)) check_intr_schedule()
2130 static int qh_schedule(struct oxu_hcd *oxu, struct ehci_qh *qh) qh_schedule() argument
2137 qh_refresh(oxu, qh); qh_schedule()
2144 status = check_intr_schedule(oxu, frame, --uframe, qh_schedule()
2161 status = check_intr_schedule(oxu, qh_schedule()
2172 status = check_intr_schedule(oxu, 0, 0, qh, &c_mask); qh_schedule()
2185 oxu_dbg(oxu, "reused qh %p schedule\n", qh); qh_schedule()
2188 status = qh_link_periodic(oxu, qh); qh_schedule()
2193 static int intr_submit(struct oxu_hcd *oxu, struct urb *urb, intr_submit() argument
2205 spin_lock_irqsave(&oxu->lock, flags); intr_submit()
2207 if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) { intr_submit()
2214 qh = qh_append_tds(oxu, urb, &empty, epnum, &urb->ep->hcpriv); intr_submit()
2220 status = qh_schedule(oxu, qh); intr_submit()
2226 qh = qh_append_tds(oxu, urb, qtd_list, epnum, &urb->ep->hcpriv); intr_submit()
2230 oxu_to_hcd(oxu)->self.bandwidth_int_reqs++; intr_submit()
2233 spin_unlock_irqrestore(&oxu->lock, flags); intr_submit()
2235 qtd_list_free(oxu, urb, qtd_list); intr_submit()
2240 static inline int itd_submit(struct oxu_hcd *oxu, struct urb *urb, itd_submit() argument
2243 oxu_dbg(oxu, "iso support is missing!\n"); itd_submit()
2247 static inline int sitd_submit(struct oxu_hcd *oxu, struct urb *urb, sitd_submit() argument
2250 oxu_dbg(oxu, "split iso support is missing!\n"); sitd_submit()
2254 static void scan_periodic(struct oxu_hcd *oxu) scan_periodic() argument
2259 mod = oxu->periodic_size << 3; scan_periodic()
2266 now_uframe = oxu->next_uframe; scan_periodic()
2267 if (HC_IS_RUNNING(oxu_to_hcd(oxu)->state)) scan_periodic()
2268 clock = readl(&oxu->regs->frame_index); scan_periodic()
2290 q_p = &oxu->pshadow[frame]; scan_periodic()
2291 hw_p = &oxu->periodic[frame]; scan_periodic()
2300 live = HC_IS_RUNNING(oxu_to_hcd(oxu)->state); scan_periodic()
2307 modified = qh_completions(oxu, temp.qh); scan_periodic()
2309 intr_deschedule(oxu, temp.qh); scan_periodic()
2313 oxu_dbg(oxu, "corrupt type %d frame %d shadow %p\n", scan_periodic()
2337 if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state)) scan_periodic()
2339 oxu->next_uframe = now_uframe; scan_periodic()
2340 now = readl(&oxu->regs->frame_index) % mod; scan_periodic()
2357 static void ehci_turn_off_all_ports(struct oxu_hcd *oxu) ehci_turn_off_all_ports() argument
2359 int port = HCS_N_PORTS(oxu->hcs_params); ehci_turn_off_all_ports()
2362 writel(PORT_RWC_BITS, &oxu->regs->port_status[port]); ehci_turn_off_all_ports()
2365 static void ehci_port_power(struct oxu_hcd *oxu, int is_on) ehci_port_power() argument
2369 if (!HCS_PPC(oxu->hcs_params)) ehci_port_power()
2372 oxu_dbg(oxu, "...power%s ports...\n", is_on ? "up" : "down"); ehci_port_power()
2373 for (port = HCS_N_PORTS(oxu->hcs_params); port > 0; ) ehci_port_power()
2374 (void) oxu_hub_control(oxu_to_hcd(oxu), ehci_port_power()
2382 * It calls driver completion functions, after dropping oxu->lock.
2384 static void ehci_work(struct oxu_hcd *oxu) ehci_work() argument
2386 timer_action_done(oxu, TIMER_IO_WATCHDOG); ehci_work()
2387 if (oxu->reclaim_ready) ehci_work()
2388 end_unlink_async(oxu); ehci_work()
2390 /* another CPU may drop oxu->lock during a schedule scan while ehci_work()
2394 if (oxu->scanning) ehci_work()
2396 oxu->scanning = 1; ehci_work()
2397 scan_async(oxu); ehci_work()
2398 if (oxu->next_uframe != -1) ehci_work()
2399 scan_periodic(oxu); ehci_work()
2400 oxu->scanning = 0; ehci_work()
2406 if (HC_IS_RUNNING(oxu_to_hcd(oxu)->state) && ehci_work()
2407 (oxu->async->qh_next.ptr != NULL || ehci_work()
2408 oxu->periodic_sched != 0)) ehci_work()
2409 timer_action(oxu, TIMER_IO_WATCHDOG); ehci_work()
2412 static void unlink_async(struct oxu_hcd *oxu, struct ehci_qh *qh) unlink_async() argument
2416 && oxu->reclaim unlink_async()
2417 && HC_IS_RUNNING(oxu_to_hcd(oxu)->state)) { unlink_async()
2420 for (last = oxu->reclaim; unlink_async()
2428 } else if (!HC_IS_RUNNING(oxu_to_hcd(oxu)->state) && oxu->reclaim) unlink_async()
2429 end_unlink_async(oxu); unlink_async()
2433 start_unlink_async(oxu, qh); unlink_async()
2442 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu210_hcd_irq() local
2446 spin_lock(&oxu->lock); oxu210_hcd_irq()
2448 status = readl(&oxu->regs->status); oxu210_hcd_irq()
2452 oxu_dbg(oxu, "device removed\n"); oxu210_hcd_irq()
2459 spin_unlock(&oxu->lock); oxu210_hcd_irq()
2464 writel(status, &oxu->regs->status); oxu210_hcd_irq()
2465 readl(&oxu->regs->command); /* unblock posted write */ oxu210_hcd_irq()
2470 dbg_status(oxu, "irq", status); oxu210_hcd_irq()
2481 oxu->reclaim_ready = 1; oxu210_hcd_irq()
2487 unsigned i = HCS_N_PORTS(oxu->hcs_params); oxu210_hcd_irq()
2491 if (!(readl(&oxu->regs->command) & CMD_RUN)) oxu210_hcd_irq()
2495 int pstatus = readl(&oxu->regs->port_status[i]); oxu210_hcd_irq()
2500 || oxu->reset_done[i] != 0) oxu210_hcd_irq()
2507 oxu->reset_done[i] = jiffies + oxu210_hcd_irq()
2509 oxu_dbg(oxu, "port %d remote wakeup\n", i + 1); oxu210_hcd_irq()
2510 mod_timer(&hcd->rh_timer, oxu->reset_done[i]); oxu210_hcd_irq()
2517 status = readl(&oxu->regs->status); oxu210_hcd_irq()
2518 dbg_cmd(oxu, "fatal", readl(&oxu->regs->command)); oxu210_hcd_irq()
2519 dbg_status(oxu, "fatal", status); oxu210_hcd_irq()
2521 oxu_err(oxu, "fatal error\n"); oxu210_hcd_irq()
2523 ehci_reset(oxu); oxu210_hcd_irq()
2524 writel(0, &oxu->regs->configured_flag); oxu210_hcd_irq()
2534 ehci_work(oxu); oxu210_hcd_irq()
2535 spin_unlock(&oxu->lock); oxu210_hcd_irq()
2543 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_irq() local
2552 if ((oxu->is_otg && (status & OXU_USBOTGI)) || oxu_irq()
2553 (!oxu->is_otg && (status & OXU_USBSPHI))) oxu_irq()
2566 struct oxu_hcd *oxu = (struct oxu_hcd *) param; oxu_watchdog() local
2569 spin_lock_irqsave(&oxu->lock, flags); oxu_watchdog()
2572 if (oxu->reclaim) { oxu_watchdog()
2573 u32 status = readl(&oxu->regs->status); oxu_watchdog()
2575 oxu_vdbg(oxu, "lost IAA\n"); oxu_watchdog()
2576 writel(STS_IAA, &oxu->regs->status); oxu_watchdog()
2577 oxu->reclaim_ready = 1; oxu_watchdog()
2582 if (test_bit(TIMER_ASYNC_OFF, &oxu->actions)) oxu_watchdog()
2583 start_unlink_async(oxu, oxu->async); oxu_watchdog()
2585 /* oxu could run by timer, without IRQs ... */ oxu_watchdog()
2586 ehci_work(oxu); oxu_watchdog()
2588 spin_unlock_irqrestore(&oxu->lock, flags); oxu_watchdog()
2595 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hcd_init() local
2600 spin_lock_init(&oxu->lock); oxu_hcd_init()
2602 setup_timer(&oxu->watchdog, oxu_watchdog, (unsigned long)oxu); oxu_hcd_init()
2608 oxu->periodic_size = DEFAULT_I_TDPS; oxu_hcd_init()
2609 retval = ehci_mem_init(oxu, GFP_KERNEL); oxu_hcd_init()
2614 hcc_params = readl(&oxu->caps->hcc_params); oxu_hcd_init()
2616 oxu->i_thresh = 8; oxu_hcd_init()
2618 oxu->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); oxu_hcd_init()
2620 oxu->reclaim = NULL; oxu_hcd_init()
2621 oxu->reclaim_ready = 0; oxu_hcd_init()
2622 oxu->next_uframe = -1; oxu_hcd_init()
2631 oxu->async->qh_next.qh = NULL; oxu_hcd_init()
2632 oxu->async->hw_next = QH_NEXT(oxu->async->qh_dma); oxu_hcd_init()
2633 oxu->async->hw_info1 = cpu_to_le32(QH_HEAD); oxu_hcd_init()
2634 oxu->async->hw_token = cpu_to_le32(QTD_STS_HALT); oxu_hcd_init()
2635 oxu->async->hw_qtd_next = EHCI_LIST_END; oxu_hcd_init()
2636 oxu->async->qh_state = QH_STATE_LINKED; oxu_hcd_init()
2637 oxu->async->hw_alt_next = QTD_NEXT(oxu->async->dummy->qtd_dma); oxu_hcd_init()
2656 oxu_dbg(oxu, "park %d\n", park); oxu_hcd_init()
2663 oxu->command = temp; oxu_hcd_init()
2672 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_reset() local
2675 spin_lock_init(&oxu->mem_lock); oxu_reset()
2676 INIT_LIST_HEAD(&oxu->urb_list); oxu_reset()
2677 oxu->urb_len = 0; oxu_reset()
2682 if (oxu->is_otg) { oxu_reset()
2683 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; oxu_reset()
2684 oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \ oxu_reset()
2685 HC_LENGTH(readl(&oxu->caps->hc_capbase)); oxu_reset()
2687 oxu->mem = hcd->regs + OXU_SPH_MEM; oxu_reset()
2689 oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET; oxu_reset()
2690 oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \ oxu_reset()
2691 HC_LENGTH(readl(&oxu->caps->hc_capbase)); oxu_reset()
2693 oxu->mem = hcd->regs + OXU_OTG_MEM; oxu_reset()
2696 oxu->hcs_params = readl(&oxu->caps->hcs_params); oxu_reset()
2697 oxu->sbrn = 0x20; oxu_reset()
2708 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_run() local
2715 retval = ehci_reset(oxu); oxu_run()
2717 ehci_mem_cleanup(oxu); oxu_run()
2720 writel(oxu->periodic_dma, &oxu->regs->frame_list); oxu_run()
2721 writel((u32) oxu->async->qh_dma, &oxu->regs->async_next); oxu_run()
2723 /* hcc_params controls whether oxu->regs->segment must (!!!) oxu_run()
2734 hcc_params = readl(&oxu->caps->hcc_params); oxu_run()
2736 writel(0, &oxu->regs->segment); oxu_run()
2738 oxu->command &= ~(CMD_LRESET | CMD_IAAD | CMD_PSE | oxu_run()
2740 oxu->command |= CMD_RUN; oxu_run()
2741 writel(oxu->command, &oxu->regs->command); oxu_run()
2742 dbg_cmd(oxu, "init", oxu->command); oxu_run()
2751 writel(FLAG_CF, &oxu->regs->configured_flag); oxu_run()
2752 readl(&oxu->regs->command); /* unblock posted writes */ oxu_run()
2754 temp = HC_VERSION(readl(&oxu->caps->hc_capbase)); oxu_run()
2755 oxu_info(oxu, "USB %x.%x started, quasi-EHCI %x.%02x, driver %s%s\n", oxu_run()
2756 ((oxu->sbrn & 0xf0)>>4), (oxu->sbrn & 0x0f), oxu_run()
2760 writel(INTR_MASK, &oxu->regs->intr_enable); /* Turn On Interrupts */ oxu_run()
2767 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_stop() local
2770 ehci_port_power(oxu, 0); oxu_stop()
2773 del_timer_sync(&oxu->watchdog); oxu_stop()
2775 spin_lock_irq(&oxu->lock); oxu_stop()
2777 ehci_quiesce(oxu); oxu_stop()
2779 ehci_reset(oxu); oxu_stop()
2780 writel(0, &oxu->regs->intr_enable); oxu_stop()
2781 spin_unlock_irq(&oxu->lock); oxu_stop()
2784 writel(0, &oxu->regs->configured_flag); oxu_stop()
2787 spin_lock_irq(&oxu->lock); oxu_stop()
2788 if (oxu->async) oxu_stop()
2789 ehci_work(oxu); oxu_stop()
2790 spin_unlock_irq(&oxu->lock); oxu_stop()
2791 ehci_mem_cleanup(oxu); oxu_stop()
2793 dbg_status(oxu, "oxu_stop completed", readl(&oxu->regs->status)); oxu_stop()
2802 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_shutdown() local
2804 (void) ehci_halt(oxu); oxu_shutdown()
2805 ehci_turn_off_all_ports(oxu); oxu_shutdown()
2808 writel(0, &oxu->regs->configured_flag); oxu_shutdown()
2811 readl(&oxu->regs->configured_flag); oxu_shutdown()
2828 struct oxu_hcd *oxu = hcd_to_oxu(hcd); __oxu_urb_enqueue() local
2837 if (!qh_urb_transaction(oxu, urb, &qtd_list, mem_flags)) __oxu_urb_enqueue()
2839 return submit_async(oxu, urb, &qtd_list, mem_flags); __oxu_urb_enqueue()
2842 if (!qh_urb_transaction(oxu, urb, &qtd_list, mem_flags)) __oxu_urb_enqueue()
2844 return intr_submit(oxu, urb, &qtd_list, mem_flags); __oxu_urb_enqueue()
2848 return itd_submit(oxu, urb, mem_flags); __oxu_urb_enqueue()
2850 return sitd_submit(oxu, urb, mem_flags); __oxu_urb_enqueue()
2860 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_urb_enqueue() local
2890 murb = (struct urb *) oxu_murb_alloc(oxu); oxu_urb_enqueue()
2921 murb = (struct urb *) oxu_murb_alloc(oxu); oxu_urb_enqueue()
2952 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_urb_dequeue() local
2956 spin_lock_irqsave(&oxu->lock, flags); oxu_urb_dequeue()
2964 unlink_async(oxu, qh); oxu_urb_dequeue()
2973 intr_deschedule(oxu, qh); oxu_urb_dequeue()
2976 qh_completions(oxu, qh); oxu_urb_dequeue()
2979 oxu_dbg(oxu, "bogus qh %p state %d\n", oxu_urb_dequeue()
2989 status = qh_schedule(oxu, qh); oxu_urb_dequeue()
2990 spin_unlock_irqrestore(&oxu->lock, flags); oxu_urb_dequeue()
3005 spin_unlock_irqrestore(&oxu->lock, flags); oxu_urb_dequeue()
3013 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_endpoint_disable() local
3021 spin_lock_irqsave(&oxu->lock, flags); oxu_endpoint_disable()
3030 oxu_vdbg(oxu, "iso delay\n"); oxu_endpoint_disable()
3038 for (tmp = oxu->async->qh_next.qh; oxu_endpoint_disable()
3045 unlink_async(oxu, qh); oxu_endpoint_disable()
3049 spin_unlock_irqrestore(&oxu->lock, flags); oxu_endpoint_disable()
3063 oxu_err(oxu, "qh %p (#%02x) state %d%s\n", oxu_endpoint_disable()
3070 spin_unlock_irqrestore(&oxu->lock, flags); oxu_endpoint_disable()
3075 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_get_frame() local
3077 return (readl(&oxu->regs->frame_index) >> 3) % oxu_get_frame()
3078 oxu->periodic_size; oxu_get_frame()
3084 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hub_status_data() local
3095 ports = HCS_N_PORTS(oxu->hcs_params); oxu_hub_status_data()
3115 spin_lock_irqsave(&oxu->lock, flags); oxu_hub_status_data()
3117 temp = readl(&oxu->regs->port_status[i]); oxu_hub_status_data()
3127 oxu->reset_done[i] = 0; oxu_hub_status_data()
3129 time_after_eq(jiffies, oxu->reset_done[i]))) { oxu_hub_status_data()
3138 spin_unlock_irqrestore(&oxu->lock, flags); oxu_hub_status_data()
3143 static inline unsigned int oxu_port_speed(struct oxu_hcd *oxu, oxu_port_speed() argument
3161 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hub_control() local
3162 int ports = HCS_N_PORTS(oxu->hcs_params); oxu_hub_control()
3163 u32 __iomem *status_reg = &oxu->regs->port_status[wIndex - 1]; oxu_hub_control()
3176 spin_lock_irqsave(&oxu->lock, flags); oxu_hub_control()
3217 oxu->reset_done[wIndex] = jiffies oxu_hub_control()
3225 if (HCS_PPC(oxu->hcs_params)) oxu_hub_control()
3241 readl(&oxu->regs->command); /* unblock posted write */ oxu_hub_control()
3244 ehci_hub_descriptor(oxu, (struct usb_hub_descriptor *) oxu_hub_control()
3270 if (!oxu->reset_done[wIndex]) { oxu_hub_control()
3272 oxu->reset_done[wIndex] = jiffies oxu_hub_control()
3275 mod_timer(&oxu_to_hcd(oxu)->rh_timer, oxu_hub_control()
3276 oxu->reset_done[wIndex]); oxu_hub_control()
3281 oxu->reset_done[wIndex])) { oxu_hub_control()
3283 oxu->reset_done[wIndex] = 0; oxu_hub_control()
3289 retval = handshake(oxu, status_reg, oxu_hub_control()
3292 oxu_err(oxu, oxu_hub_control()
3304 oxu->reset_done[wIndex])) { oxu_hub_control()
3306 oxu->reset_done[wIndex] = 0; oxu_hub_control()
3314 retval = handshake(oxu, status_reg, oxu_hub_control()
3317 oxu_err(oxu, "port %d reset error %d\n", oxu_hub_control()
3323 temp = check_reset_complete(oxu, wIndex, status_reg, oxu_hub_control()
3329 test_bit(wIndex, &oxu->companion_ports)) { oxu_hub_control()
3333 oxu_dbg(oxu, "port %d --> companion\n", wIndex + 1); oxu_hub_control()
3346 status |= oxu_port_speed(oxu, temp); oxu_hub_control()
3362 dbg_port(oxu, "GetStatus", wIndex + 1, temp); oxu_hub_control()
3396 if (HCS_PPC(oxu->hcs_params)) oxu_hub_control()
3406 oxu_vdbg(oxu, "port %d reset\n", wIndex + 1); oxu_hub_control()
3414 oxu->reset_done[wIndex] = jiffies oxu_hub_control()
3428 ehci_quiesce(oxu); oxu_hub_control()
3429 ehci_halt(oxu); oxu_hub_control()
3437 readl(&oxu->regs->command); /* unblock posted writes */ oxu_hub_control()
3445 spin_unlock_irqrestore(&oxu->lock, flags); oxu_hub_control()
3453 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_bus_suspend() local
3457 oxu_dbg(oxu, "suspend root hub\n"); oxu_bus_suspend()
3459 if (time_before(jiffies, oxu->next_statechange)) oxu_bus_suspend()
3462 port = HCS_N_PORTS(oxu->hcs_params); oxu_bus_suspend()
3463 spin_lock_irq(&oxu->lock); oxu_bus_suspend()
3467 ehci_quiesce(oxu); oxu_bus_suspend()
3470 oxu->command = readl(&oxu->regs->command); oxu_bus_suspend()
3471 if (oxu->reclaim) oxu_bus_suspend()
3472 oxu->reclaim_ready = 1; oxu_bus_suspend()
3473 ehci_work(oxu); oxu_bus_suspend()
3480 oxu->bus_suspended = 0; oxu_bus_suspend()
3482 u32 __iomem *reg = &oxu->regs->port_status[port]; oxu_bus_suspend()
3490 set_bit(port, &oxu->bus_suspended); oxu_bus_suspend()
3500 oxu_vdbg(oxu, "port %d, %08x -> %08x\n", oxu_bus_suspend()
3507 del_timer_sync(&oxu->watchdog); oxu_bus_suspend()
3508 ehci_halt(oxu); oxu_bus_suspend()
3515 writel(mask, &oxu->regs->intr_enable); oxu_bus_suspend()
3516 readl(&oxu->regs->intr_enable); oxu_bus_suspend()
3518 oxu->next_statechange = jiffies + msecs_to_jiffies(10); oxu_bus_suspend()
3519 spin_unlock_irq(&oxu->lock); oxu_bus_suspend()
3526 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_bus_resume() local
3530 if (time_before(jiffies, oxu->next_statechange)) oxu_bus_resume()
3532 spin_lock_irq(&oxu->lock); oxu_bus_resume()
3540 temp = readl(&oxu->regs->intr_enable); oxu_bus_resume()
3541 oxu_dbg(oxu, "resume root hub%s\n", temp ? "" : " after power loss"); oxu_bus_resume()
3546 writel(0, &oxu->regs->intr_enable); oxu_bus_resume()
3549 writel(0, &oxu->regs->segment); oxu_bus_resume()
3550 writel(oxu->periodic_dma, &oxu->regs->frame_list); oxu_bus_resume()
3551 writel((u32) oxu->async->qh_dma, &oxu->regs->async_next); oxu_bus_resume()
3554 writel(oxu->command, &oxu->regs->command); oxu_bus_resume()
3561 i = HCS_N_PORTS(oxu->hcs_params); oxu_bus_resume()
3563 temp = readl(&oxu->regs->port_status[i]); oxu_bus_resume()
3566 if (test_bit(i, &oxu->bus_suspended) && (temp & PORT_SUSPEND)) { oxu_bus_resume()
3567 oxu->reset_done[i] = jiffies + msecs_to_jiffies(20); oxu_bus_resume()
3570 writel(temp, &oxu->regs->port_status[i]); oxu_bus_resume()
3572 i = HCS_N_PORTS(oxu->hcs_params); oxu_bus_resume()
3575 temp = readl(&oxu->regs->port_status[i]); oxu_bus_resume()
3576 if (test_bit(i, &oxu->bus_suspended) && (temp & PORT_SUSPEND)) { oxu_bus_resume()
3578 writel(temp, &oxu->regs->port_status[i]); oxu_bus_resume()
3579 oxu_vdbg(oxu, "resumed port %d\n", i + 1); oxu_bus_resume()
3582 (void) readl(&oxu->regs->command); oxu_bus_resume()
3586 if (oxu->async->qh_next.qh) oxu_bus_resume()
3588 if (oxu->periodic_sched) oxu_bus_resume()
3591 oxu->command |= temp; oxu_bus_resume()
3592 writel(oxu->command, &oxu->regs->command); oxu_bus_resume()
3595 oxu->next_statechange = jiffies + msecs_to_jiffies(5); oxu_bus_resume()
3599 writel(INTR_MASK, &oxu->regs->intr_enable); oxu_bus_resume()
3601 spin_unlock_irq(&oxu->lock); oxu_bus_resume()
3726 struct oxu_hcd *oxu; oxu_create() local
3745 oxu = hcd_to_oxu(hcd); oxu_create()
3746 oxu->is_otg = otg; oxu_create()
H A Doxu210hp.h303 struct oxu_hcd *oxu; member in struct:ehci_qh

Completed in 87 milliseconds