Lines Matching refs:ehci

111 static unsigned ehci_moschip_read_frame_index(struct ehci_hcd *ehci)  in ehci_moschip_read_frame_index()  argument
115 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index()
117 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index()
121 static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) in ehci_read_frame_index() argument
123 if (ehci->frame_index_bug) in ehci_read_frame_index()
124 return ehci_moschip_read_frame_index(ehci); in ehci_read_frame_index()
125 return ehci_readl(ehci, &ehci->regs->frame_index); in ehci_read_frame_index()
149 int ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr, in ehci_handshake() argument
155 result = ehci_readl(ehci, ptr); in ehci_handshake()
169 static int tdi_in_host_mode (struct ehci_hcd *ehci) in tdi_in_host_mode() argument
173 tmp = ehci_readl(ehci, &ehci->regs->usbmode); in tdi_in_host_mode()
181 static int ehci_halt (struct ehci_hcd *ehci) in ehci_halt() argument
185 spin_lock_irq(&ehci->lock); in ehci_halt()
188 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in ehci_halt()
190 if (ehci_is_TDI(ehci) && !tdi_in_host_mode(ehci)) { in ehci_halt()
191 spin_unlock_irq(&ehci->lock); in ehci_halt()
199 ehci->command &= ~CMD_RUN; in ehci_halt()
200 temp = ehci_readl(ehci, &ehci->regs->command); in ehci_halt()
202 ehci_writel(ehci, temp, &ehci->regs->command); in ehci_halt()
204 spin_unlock_irq(&ehci->lock); in ehci_halt()
205 synchronize_irq(ehci_to_hcd(ehci)->irq); in ehci_halt()
207 return ehci_handshake(ehci, &ehci->regs->status, in ehci_halt()
212 static void tdi_reset (struct ehci_hcd *ehci) in tdi_reset() argument
216 tmp = ehci_readl(ehci, &ehci->regs->usbmode); in tdi_reset()
222 if (ehci_big_endian_mmio(ehci)) in tdi_reset()
224 ehci_writel(ehci, tmp, &ehci->regs->usbmode); in tdi_reset()
231 int ehci_reset(struct ehci_hcd *ehci) in ehci_reset() argument
234 u32 command = ehci_readl(ehci, &ehci->regs->command); in ehci_reset()
238 if (ehci->debug && !dbgp_reset_prep(ehci_to_hcd(ehci))) in ehci_reset()
239 ehci->debug = NULL; in ehci_reset()
242 dbg_cmd (ehci, "reset", command); in ehci_reset()
243 ehci_writel(ehci, command, &ehci->regs->command); in ehci_reset()
244 ehci->rh_state = EHCI_RH_HALTED; in ehci_reset()
245 ehci->next_statechange = jiffies; in ehci_reset()
246 retval = ehci_handshake(ehci, &ehci->regs->command, in ehci_reset()
249 if (ehci->has_hostpc) { in ehci_reset()
250 ehci_writel(ehci, USBMODE_EX_HC | USBMODE_EX_VBPS, in ehci_reset()
251 &ehci->regs->usbmode_ex); in ehci_reset()
252 ehci_writel(ehci, TXFIFO_DEFAULT, &ehci->regs->txfill_tuning); in ehci_reset()
257 if (ehci_is_TDI(ehci)) in ehci_reset()
258 tdi_reset (ehci); in ehci_reset()
260 if (ehci->debug) in ehci_reset()
261 dbgp_external_startup(ehci_to_hcd(ehci)); in ehci_reset()
263 ehci->port_c_suspend = ehci->suspended_ports = in ehci_reset()
264 ehci->resuming_ports = 0; in ehci_reset()
273 static void ehci_quiesce (struct ehci_hcd *ehci) in ehci_quiesce() argument
277 if (ehci->rh_state != EHCI_RH_RUNNING) in ehci_quiesce()
281 temp = (ehci->command << 10) & (STS_ASS | STS_PSS); in ehci_quiesce()
282 ehci_handshake(ehci, &ehci->regs->status, STS_ASS | STS_PSS, temp, in ehci_quiesce()
286 spin_lock_irq(&ehci->lock); in ehci_quiesce()
287 ehci->command &= ~(CMD_ASE | CMD_PSE); in ehci_quiesce()
288 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_quiesce()
289 spin_unlock_irq(&ehci->lock); in ehci_quiesce()
292 ehci_handshake(ehci, &ehci->regs->status, STS_ASS | STS_PSS, 0, in ehci_quiesce()
298 static void end_iaa_cycle(struct ehci_hcd *ehci);
299 static void end_unlink_async(struct ehci_hcd *ehci);
300 static void unlink_empty_async(struct ehci_hcd *ehci);
301 static void ehci_work(struct ehci_hcd *ehci);
302 static void start_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh);
303 static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh);
304 static int ehci_port_power(struct ehci_hcd *ehci, int portnum, bool enable);
319 static void ehci_turn_off_all_ports(struct ehci_hcd *ehci) in ehci_turn_off_all_ports() argument
321 int port = HCS_N_PORTS(ehci->hcs_params); in ehci_turn_off_all_ports()
324 spin_unlock_irq(&ehci->lock); in ehci_turn_off_all_ports()
325 ehci_port_power(ehci, port, false); in ehci_turn_off_all_ports()
326 spin_lock_irq(&ehci->lock); in ehci_turn_off_all_ports()
327 ehci_writel(ehci, PORT_RWC_BITS, in ehci_turn_off_all_ports()
328 &ehci->regs->port_status[port]); in ehci_turn_off_all_ports()
336 static void ehci_silence_controller(struct ehci_hcd *ehci) in ehci_silence_controller() argument
338 ehci_halt(ehci); in ehci_silence_controller()
340 spin_lock_irq(&ehci->lock); in ehci_silence_controller()
341 ehci->rh_state = EHCI_RH_HALTED; in ehci_silence_controller()
342 ehci_turn_off_all_ports(ehci); in ehci_silence_controller()
345 ehci_writel(ehci, 0, &ehci->regs->configured_flag); in ehci_silence_controller()
348 ehci_readl(ehci, &ehci->regs->configured_flag); in ehci_silence_controller()
349 spin_unlock_irq(&ehci->lock); in ehci_silence_controller()
358 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_shutdown() local
366 if (!ehci->sbrn) in ehci_shutdown()
369 spin_lock_irq(&ehci->lock); in ehci_shutdown()
370 ehci->shutdown = true; in ehci_shutdown()
371 ehci->rh_state = EHCI_RH_STOPPING; in ehci_shutdown()
372 ehci->enabled_hrtimer_events = 0; in ehci_shutdown()
373 spin_unlock_irq(&ehci->lock); in ehci_shutdown()
375 ehci_silence_controller(ehci); in ehci_shutdown()
377 hrtimer_cancel(&ehci->hrtimer); in ehci_shutdown()
386 static void ehci_work (struct ehci_hcd *ehci) in ehci_work() argument
392 if (ehci->scanning) { in ehci_work()
393 ehci->need_rescan = true; in ehci_work()
396 ehci->scanning = true; in ehci_work()
399 ehci->need_rescan = false; in ehci_work()
400 if (ehci->async_count) in ehci_work()
401 scan_async(ehci); in ehci_work()
402 if (ehci->intr_count > 0) in ehci_work()
403 scan_intr(ehci); in ehci_work()
404 if (ehci->isoc_count > 0) in ehci_work()
405 scan_isoc(ehci); in ehci_work()
406 if (ehci->need_rescan) in ehci_work()
408 ehci->scanning = false; in ehci_work()
414 turn_on_io_watchdog(ehci); in ehci_work()
422 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_stop() local
424 ehci_dbg (ehci, "stop\n"); in ehci_stop()
428 spin_lock_irq(&ehci->lock); in ehci_stop()
429 ehci->enabled_hrtimer_events = 0; in ehci_stop()
430 spin_unlock_irq(&ehci->lock); in ehci_stop()
432 ehci_quiesce(ehci); in ehci_stop()
433 ehci_silence_controller(ehci); in ehci_stop()
434 ehci_reset (ehci); in ehci_stop()
436 hrtimer_cancel(&ehci->hrtimer); in ehci_stop()
437 remove_sysfs_files(ehci); in ehci_stop()
438 remove_debug_files (ehci); in ehci_stop()
441 spin_lock_irq (&ehci->lock); in ehci_stop()
442 end_free_itds(ehci); in ehci_stop()
443 spin_unlock_irq (&ehci->lock); in ehci_stop()
444 ehci_mem_cleanup (ehci); in ehci_stop()
446 if (ehci->amd_pll_fix == 1) in ehci_stop()
449 dbg_status (ehci, "ehci_stop completed", in ehci_stop()
450 ehci_readl(ehci, &ehci->regs->status)); in ehci_stop()
456 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_init() local
462 spin_lock_init(&ehci->lock); in ehci_init()
467 ehci->need_io_watchdog = 1; in ehci_init()
469 hrtimer_init(&ehci->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); in ehci_init()
470 ehci->hrtimer.function = ehci_hrtimer_func; in ehci_init()
471 ehci->next_hrtimer_event = EHCI_HRTIMER_NO_EVENT; in ehci_init()
473 hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); in ehci_init()
479 ehci->uframe_periodic_max = 100; in ehci_init()
485 ehci->periodic_size = DEFAULT_I_TDPS; in ehci_init()
486 INIT_LIST_HEAD(&ehci->async_unlink); in ehci_init()
487 INIT_LIST_HEAD(&ehci->async_idle); in ehci_init()
488 INIT_LIST_HEAD(&ehci->intr_unlink_wait); in ehci_init()
489 INIT_LIST_HEAD(&ehci->intr_unlink); in ehci_init()
490 INIT_LIST_HEAD(&ehci->intr_qh_list); in ehci_init()
491 INIT_LIST_HEAD(&ehci->cached_itd_list); in ehci_init()
492 INIT_LIST_HEAD(&ehci->cached_sitd_list); in ehci_init()
493 INIT_LIST_HEAD(&ehci->tt_list); in ehci_init()
498 case 0: ehci->periodic_size = 1024; break; in ehci_init()
499 case 1: ehci->periodic_size = 512; break; in ehci_init()
500 case 2: ehci->periodic_size = 256; break; in ehci_init()
504 if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) in ehci_init()
509 ehci->i_thresh = 0; in ehci_init()
511 ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); in ehci_init()
520 ehci->async->qh_next.qh = NULL; in ehci_init()
521 hw = ehci->async->hw; in ehci_init()
522 hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); in ehci_init()
523 hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); in ehci_init()
525 hw->hw_info1 |= cpu_to_hc32(ehci, QH_INACTIVATE); in ehci_init()
527 hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); in ehci_init()
528 hw->hw_qtd_next = EHCI_LIST_END(ehci); in ehci_init()
529 ehci->async->qh_state = QH_STATE_LINKED; in ehci_init()
530 hw->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma); in ehci_init()
537 ehci->has_ppcd = 1; in ehci_init()
538 ehci_dbg(ehci, "enable per-port change event\n"); in ehci_init()
554 ehci_dbg(ehci, "park %d\n", park); in ehci_init()
561 ehci->command = temp; in ehci_init()
568 ehci->old_current = ~0; in ehci_init()
575 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_run() local
584 ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list); in ehci_run()
585 ehci_writel(ehci, (u32)ehci->async->qh_dma, &ehci->regs->async_next); in ehci_run()
599 hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params); in ehci_run()
601 ehci_writel(ehci, 0, &ehci->regs->segment); in ehci_run()
605 ehci_info(ehci, "enabled 64bit DMA\n"); in ehci_run()
612 ehci->command &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET); in ehci_run()
613 ehci->command |= CMD_RUN; in ehci_run()
614 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_run()
615 dbg_cmd (ehci, "init", ehci->command); in ehci_run()
632 ehci->rh_state = EHCI_RH_RUNNING; in ehci_run()
633 ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); in ehci_run()
636 ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ in ehci_run()
642 if (ehci->is_aspeed) in ehci_run()
643 rc = ehci_handshake(ehci, &ehci->regs->command, CMD_RUN, in ehci_run()
646 rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, in ehci_run()
652 ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n", in ehci_run()
653 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc); in ehci_run()
657 ehci->last_periodic_enable = ktime_get_real(); in ehci_run()
659 temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_run()
660 ehci_info (ehci, in ehci_run()
662 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), in ehci_run()
664 (ignore_oc || ehci->spurious_oc) ? ", overcurrent ignored" : ""); in ehci_run()
666 ehci_writel(ehci, INTR_MASK, in ehci_run()
667 &ehci->regs->intr_enable); /* Turn On Interrupts */ in ehci_run()
673 create_debug_files(ehci); in ehci_run()
674 create_sysfs_files(ehci); in ehci_run()
681 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_setup() local
684 ehci->regs = (void __iomem *)ehci->caps + in ehci_setup()
685 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_setup()
686 dbg_hcs_params(ehci, "reset"); in ehci_setup()
687 dbg_hcc_params(ehci, "reset"); in ehci_setup()
690 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); in ehci_setup()
692 ehci->sbrn = HCD_USB2; in ehci_setup()
699 retval = ehci_halt(ehci); in ehci_setup()
701 ehci_mem_cleanup(ehci); in ehci_setup()
705 ehci_reset(ehci); in ehci_setup()
715 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_irq() local
720 spin_lock(&ehci->lock); in ehci_irq()
723 current_status = ehci_readl(ehci, &ehci->regs->status); in ehci_irq()
728 ehci_dbg (ehci, "device removed\n"); in ehci_irq()
740 if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) { in ehci_irq()
741 spin_unlock(&ehci->lock); in ehci_irq()
746 ehci_writel(ehci, masked_status, &ehci->regs->status); in ehci_irq()
749 current_status = ehci_readl(ehci, &ehci->regs->status); in ehci_irq()
753 cmd = ehci_readl(ehci, &ehci->regs->command); in ehci_irq()
759 INCR(ehci->stats.normal); in ehci_irq()
761 INCR(ehci->stats.error); in ehci_irq()
769 ehci->enabled_hrtimer_events &= ~BIT(EHCI_HRTIMER_IAA_WATCHDOG); in ehci_irq()
778 if (ehci->next_hrtimer_event == EHCI_HRTIMER_IAA_WATCHDOG) in ehci_irq()
779 ++ehci->next_hrtimer_event; in ehci_irq()
783 ehci_dbg(ehci, "IAA with IAAD still set?\n"); in ehci_irq()
784 if (ehci->iaa_in_progress) in ehci_irq()
785 INCR(ehci->stats.iaa); in ehci_irq()
786 end_iaa_cycle(ehci); in ehci_irq()
791 unsigned i = HCS_N_PORTS (ehci->hcs_params); in ehci_irq()
798 if (ehci->rh_state == EHCI_RH_SUSPENDED) in ehci_irq()
802 if (ehci->has_ppcd) in ehci_irq()
811 pstatus = ehci_readl(ehci, in ehci_irq()
812 &ehci->regs->port_status[i]); in ehci_irq()
816 if (!(test_bit(i, &ehci->suspended_ports) && in ehci_irq()
820 ehci->reset_done[i] == 0)) in ehci_irq()
827 ehci->reset_done[i] = jiffies + in ehci_irq()
829 set_bit(i, &ehci->resuming_ports); in ehci_irq()
830 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); in ehci_irq()
832 mod_timer(&hcd->rh_timer, ehci->reset_done[i]); in ehci_irq()
838 ehci_err(ehci, "fatal error\n"); in ehci_irq()
839 dbg_cmd(ehci, "fatal", cmd); in ehci_irq()
840 dbg_status(ehci, "fatal", status); in ehci_irq()
845 ehci->shutdown = true; in ehci_irq()
846 ehci->rh_state = EHCI_RH_STOPPING; in ehci_irq()
847 ehci->command &= ~(CMD_RUN | CMD_ASE | CMD_PSE); in ehci_irq()
848 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_irq()
849 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in ehci_irq()
850 ehci_handle_controller_death(ehci); in ehci_irq()
857 ehci_work (ehci); in ehci_irq()
858 spin_unlock(&ehci->lock); in ehci_irq()
883 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_urb_enqueue() local
898 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags)) in ehci_urb_enqueue()
900 return submit_async(ehci, urb, &qtd_list, mem_flags); in ehci_urb_enqueue()
903 if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags)) in ehci_urb_enqueue()
905 return intr_submit(ehci, urb, &qtd_list, mem_flags); in ehci_urb_enqueue()
909 return itd_submit (ehci, urb, mem_flags); in ehci_urb_enqueue()
911 return sitd_submit (ehci, urb, mem_flags); in ehci_urb_enqueue()
921 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_urb_dequeue() local
926 spin_lock_irqsave (&ehci->lock, flags); in ehci_urb_dequeue()
943 start_unlink_intr(ehci, qh); in ehci_urb_dequeue()
945 start_unlink_async(ehci, qh); in ehci_urb_dequeue()
956 qh_completions(ehci, qh); in ehci_urb_dequeue()
961 spin_unlock_irqrestore (&ehci->lock, flags); in ehci_urb_dequeue()
972 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_endpoint_disable() local
980 spin_lock_irqsave (&ehci->lock, flags); in ehci_endpoint_disable()
995 reserve_release_iso_bandwidth(ehci, stream, -1); in ehci_endpoint_disable()
1008 start_unlink_async(ehci, qh); in ehci_endpoint_disable()
1010 start_unlink_intr(ehci, qh); in ehci_endpoint_disable()
1016 spin_unlock_irqrestore (&ehci->lock, flags); in ehci_endpoint_disable()
1024 reserve_release_intr_bandwidth(ehci, qh, -1); in ehci_endpoint_disable()
1025 qh_destroy(ehci, qh); in ehci_endpoint_disable()
1033 ehci_err (ehci, "qh %p (#%02x) state %d%s\n", in ehci_endpoint_disable()
1040 spin_unlock_irqrestore (&ehci->lock, flags); in ehci_endpoint_disable()
1046 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_endpoint_reset() local
1056 spin_lock_irqsave(&ehci->lock, flags); in ehci_endpoint_reset()
1075 start_unlink_async(ehci, qh); in ehci_endpoint_reset()
1077 start_unlink_intr(ehci, qh); in ehci_endpoint_reset()
1080 spin_unlock_irqrestore(&ehci->lock, flags); in ehci_endpoint_reset()
1085 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_get_frame() local
1086 return (ehci_read_frame_index(ehci) >> 3) % ehci->periodic_size; in ehci_get_frame()
1095 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_remove_device() local
1097 spin_lock_irq(&ehci->lock); in ehci_remove_device()
1099 spin_unlock_irq(&ehci->lock); in ehci_remove_device()
1107 static void ehci_zx_wakeup_clear(struct ehci_hcd *ehci) in ehci_zx_wakeup_clear() argument
1109 u32 __iomem *reg = &ehci->regs->port_status[4]; in ehci_zx_wakeup_clear()
1110 u32 t1 = ehci_readl(ehci, reg); in ehci_zx_wakeup_clear()
1114 ehci_writel(ehci, t1, reg); in ehci_zx_wakeup_clear()
1115 t1 = ehci_readl(ehci, reg); in ehci_zx_wakeup_clear()
1118 ehci_writel(ehci, t1, reg); in ehci_zx_wakeup_clear()
1119 ehci_readl(ehci, reg); in ehci_zx_wakeup_clear()
1121 t1 = ehci_readl(ehci, reg); in ehci_zx_wakeup_clear()
1122 ehci_writel(ehci, t1 | PORT_CSC, reg); in ehci_zx_wakeup_clear()
1123 ehci_readl(ehci, reg); in ehci_zx_wakeup_clear()
1132 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_suspend() local
1134 if (time_before(jiffies, ehci->next_statechange)) in ehci_suspend()
1142 ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup); in ehci_suspend()
1144 spin_lock_irq(&ehci->lock); in ehci_suspend()
1145 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in ehci_suspend()
1146 (void) ehci_readl(ehci, &ehci->regs->intr_enable); in ehci_suspend()
1149 spin_unlock_irq(&ehci->lock); in ehci_suspend()
1166 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_resume() local
1168 if (time_before(jiffies, ehci->next_statechange)) in ehci_resume()
1174 if (ehci->shutdown) in ehci_resume()
1177 if (ehci->zx_wakeup_clear_needed) in ehci_resume()
1178 ehci_zx_wakeup_clear(ehci); in ehci_resume()
1185 if (ehci_readl(ehci, &ehci->regs->configured_flag) == FLAG_CF && in ehci_resume()
1189 ehci_prepare_ports_for_controller_resume(ehci); in ehci_resume()
1191 spin_lock_irq(&ehci->lock); in ehci_resume()
1192 if (ehci->shutdown) in ehci_resume()
1197 ehci_writel(ehci, mask, &ehci->regs->intr_enable); in ehci_resume()
1198 ehci_readl(ehci, &ehci->regs->intr_enable); in ehci_resume()
1200 spin_unlock_irq(&ehci->lock); in ehci_resume()
1209 (void) ehci_halt(ehci); in ehci_resume()
1210 (void) ehci_reset(ehci); in ehci_resume()
1212 spin_lock_irq(&ehci->lock); in ehci_resume()
1213 if (ehci->shutdown) in ehci_resume()
1216 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_resume()
1217 ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); in ehci_resume()
1218 ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ in ehci_resume()
1220 ehci->rh_state = EHCI_RH_SUSPENDED; in ehci_resume()
1221 spin_unlock_irq(&ehci->lock); in ehci_resume()