- create_debug_files (ehci);
-
- return 0;
-}
-
-/* always called by thread; normally rmmod */
-
-static void ehci_stop (struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci (hcd);
- u8 rh_ports, port;
-
- ehci_dbg (ehci, "stop\n");
-
- /* no more interrupts ... */
- if (hcd->state == USB_STATE_RUNNING)
- ehci_ready (ehci);
- if (in_interrupt ()) { /* must not happen!! */
- ehci_err (ehci, "stopped in_interrupt!\n");
- return;
- }
- del_timer_sync (&ehci->watchdog);
-
- /* Turn off port power on all root hub ports. */
- rh_ports = HCS_N_PORTS (ehci->hcs_params);
- for (port = 1; port <= rh_ports; port++) {
- ehci_hub_control(hcd, ClearPortFeature, USB_PORT_FEAT_POWER,
- port, NULL, 0);
- }
-
- ehci_reset (ehci);
- writel (0, &ehci->regs->intr_enable);
-
- /* let companion controllers work when we aren't */
- writel (0, &ehci->regs->configured_flag);
- unregister_reboot_notifier (&ehci->reboot_notifier);
-
- remove_debug_files (ehci);
-
- /* root hub is shut down separately (first, when possible) */
- spin_lock_irq (&ehci->lock);
- if (ehci->async)
- ehci_work (ehci, NULL);
- spin_unlock_irq (&ehci->lock);
- ehci_mem_cleanup (ehci);
-
-#ifdef EHCI_STATS
- ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n",
- ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim,
- ehci->stats.lost_iaa);
- ehci_dbg (ehci, "complete %ld unlink %ld\n",
- ehci->stats.complete, ehci->stats.unlink);
-#endif
-
- dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status));
-}
-
-static int ehci_get_frame (struct usb_hcd *hcd)
-{
- struct ehci_hcd *ehci = hcd_to_ehci (hcd);
- return (readl (&ehci->regs->frame_index) >> 3) % ehci->periodic_size;
-}
-
-/*-------------------------------------------------------------------------*/
-
-#ifdef CONFIG_PM
-
-/* suspend/resume, section 4.3 */
-
-/* These routines rely on PCI to handle powerdown and wakeup, and
- * transceivers that don't need any software attention to set up
- * the right sort of wakeup.
- */
-
-static int ehci_suspend (struct usb_hcd *hcd, u32 state)
-{
- struct ehci_hcd *ehci = hcd_to_ehci (hcd);
-
- while (time_before (jiffies, ehci->next_statechange))
- msleep (100);
-
-#ifdef CONFIG_USB_SUSPEND
- (void) usb_suspend_device (hcd->self.root_hub, state);
-#else
- /* FIXME lock root hub */
- (void) ehci_hub_suspend (hcd);
-#endif
-
- // save (PCI) FLADJ in case of Vaux power loss