diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-10-08 09:11:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 14:23:59 -0400 |
commit | cfa49b4b88fe14d2b5792f2ea7ba5b88c8cd1d15 (patch) | |
tree | 5a689a1365b7b0844421ec5a18a3a9af4d28c323 /drivers/usb/host/ohci-hub.c | |
parent | d4ae47dc5670efecd2214110caf33dfc0ff7191f (diff) |
USB: ohci: merge ohci_finish_controller_resume with ohci_resume
Merge ohci_finish_controller_resume with ohci_resume as suggested by Alan
Stern. Since ohci_finish_controller_resume no longer exists, update the
various OHCI drivers to call ohci_resume() instead. Some drivers used to set
themselves the bit HCD_FLAG_HW_ACCESSIBLE, which is now handled by
ohci_resume().
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-hub.c')
-rw-r--r-- | drivers/usb/host/ohci-hub.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 2f3619eefef..db09dae7b55 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c | |||
@@ -316,48 +316,6 @@ static int ohci_bus_resume (struct usb_hcd *hcd) | |||
316 | return rc; | 316 | return rc; |
317 | } | 317 | } |
318 | 318 | ||
319 | /* Carry out the final steps of resuming the controller device */ | ||
320 | static void __maybe_unused ohci_finish_controller_resume(struct usb_hcd *hcd) | ||
321 | { | ||
322 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | ||
323 | int port; | ||
324 | bool need_reinit = false; | ||
325 | |||
326 | /* See if the controller is already running or has been reset */ | ||
327 | ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); | ||
328 | if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { | ||
329 | need_reinit = true; | ||
330 | } else { | ||
331 | switch (ohci->hc_control & OHCI_CTRL_HCFS) { | ||
332 | case OHCI_USB_OPER: | ||
333 | case OHCI_USB_RESET: | ||
334 | need_reinit = true; | ||
335 | } | ||
336 | } | ||
337 | |||
338 | /* If needed, reinitialize and suspend the root hub */ | ||
339 | if (need_reinit) { | ||
340 | spin_lock_irq(&ohci->lock); | ||
341 | ohci_rh_resume(ohci); | ||
342 | ohci_rh_suspend(ohci, 0); | ||
343 | spin_unlock_irq(&ohci->lock); | ||
344 | } | ||
345 | |||
346 | /* Normally just turn on port power and enable interrupts */ | ||
347 | else { | ||
348 | ohci_dbg(ohci, "powerup ports\n"); | ||
349 | for (port = 0; port < ohci->num_ports; port++) | ||
350 | ohci_writel(ohci, RH_PS_PPS, | ||
351 | &ohci->regs->roothub.portstatus[port]); | ||
352 | |||
353 | ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrenable); | ||
354 | ohci_readl(ohci, &ohci->regs->intrenable); | ||
355 | msleep(20); | ||
356 | } | ||
357 | |||
358 | usb_hcd_resume_root_hub(hcd); | ||
359 | } | ||
360 | |||
361 | /* Carry out polling-, autostop-, and autoresume-related state changes */ | 319 | /* Carry out polling-, autostop-, and autoresume-related state changes */ |
362 | static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed, | 320 | static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed, |
363 | int any_connected, int rhsc_status) | 321 | int any_connected, int rhsc_status) |