aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-ssb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-ssb.c')
-rw-r--r--drivers/usb/host/ohci-ssb.c37
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c
index 6e9c2d6db887..c4265caec780 100644
--- a/drivers/usb/host/ohci-ssb.c
+++ b/drivers/usb/host/ohci-ssb.c
@@ -60,36 +60,6 @@ static int ssb_ohci_start(struct usb_hcd *hcd)
60 return err; 60 return err;
61} 61}
62 62
63#ifdef CONFIG_PM
64static int ssb_ohci_hcd_suspend(struct usb_hcd *hcd, pm_message_t message)
65{
66 struct ssb_ohci_device *ohcidev = hcd_to_ssb_ohci(hcd);
67 struct ohci_hcd *ohci = &ohcidev->ohci;
68 unsigned long flags;
69
70 spin_lock_irqsave(&ohci->lock, flags);
71
72 ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
73 ohci_readl(ohci, &ohci->regs->intrdisable); /* commit write */
74
75 /* make sure snapshot being resumed re-enumerates everything */
76 if (message.event == PM_EVENT_PRETHAW)
77 ohci_usb_reset(ohci);
78
79 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
80
81 spin_unlock_irqrestore(&ohci->lock, flags);
82 return 0;
83}
84
85static int ssb_ohci_hcd_resume(struct usb_hcd *hcd)
86{
87 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
88 usb_hcd_resume_root_hub(hcd);
89 return 0;
90}
91#endif /* CONFIG_PM */
92
93static const struct hc_driver ssb_ohci_hc_driver = { 63static const struct hc_driver ssb_ohci_hc_driver = {
94 .description = "ssb-usb-ohci", 64 .description = "ssb-usb-ohci",
95 .product_desc = "SSB OHCI Controller", 65 .product_desc = "SSB OHCI Controller",
@@ -103,11 +73,6 @@ static const struct hc_driver ssb_ohci_hc_driver = {
103 .stop = ohci_stop, 73 .stop = ohci_stop,
104 .shutdown = ohci_shutdown, 74 .shutdown = ohci_shutdown,
105 75
106#ifdef CONFIG_PM
107 .suspend = ssb_ohci_hcd_suspend,
108 .resume = ssb_ohci_hcd_resume,
109#endif
110
111 .urb_enqueue = ohci_urb_enqueue, 76 .urb_enqueue = ohci_urb_enqueue,
112 .urb_dequeue = ohci_urb_dequeue, 77 .urb_dequeue = ohci_urb_dequeue,
113 .endpoint_disable = ohci_endpoint_disable, 78 .endpoint_disable = ohci_endpoint_disable,
@@ -116,7 +81,6 @@ static const struct hc_driver ssb_ohci_hc_driver = {
116 81
117 .hub_status_data = ohci_hub_status_data, 82 .hub_status_data = ohci_hub_status_data,
118 .hub_control = ohci_hub_control, 83 .hub_control = ohci_hub_control,
119 .hub_irq_enable = ohci_rhsc_enable,
120#ifdef CONFIG_PM 84#ifdef CONFIG_PM
121 .bus_suspend = ohci_bus_suspend, 85 .bus_suspend = ohci_bus_suspend,
122 .bus_resume = ohci_bus_resume, 86 .bus_resume = ohci_bus_resume,
@@ -224,6 +188,7 @@ static int ssb_ohci_resume(struct ssb_device *dev)
224 188
225 ssb_device_enable(dev, ohcidev->enable_flags); 189 ssb_device_enable(dev, ohcidev->enable_flags);
226 190
191 ohci_finish_controller_resume(hcd);
227 return 0; 192 return 0;
228} 193}
229 194