diff options
author | David Brownell <david-b@pacbell.net> | 2005-11-23 18:45:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-24 02:04:28 -0500 |
commit | 21b1861fb2ba5b25b32c63bc540bbc7ca1d186f8 (patch) | |
tree | bb99e3e7d2ff715d9dbee2db6b3c229d75c2365b /drivers/usb/host | |
parent | 188075211cc75a31190de4a19a084e3d83ee1c89 (diff) |
[PATCH] USB: ohci, move ppc asic tweaks nearer pci
This should fix a suspend/resume issues that appear with OHCI on some
PPC hardware. The PCI layer should doesn't have the hooks needed for
such ASIC-specific hooks (in this case, software clock gating), so
this moves the code to do that into hcd-pci.c ... where it can be
done after the relevant PCI PM state transition (to/from D3).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index a59e536441e1..5f22e6590cd1 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -14,15 +14,6 @@ | |||
14 | * This file is licenced under the GPL. | 14 | * This file is licenced under the GPL. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/jiffies.h> | ||
18 | |||
19 | #ifdef CONFIG_PPC_PMAC | ||
20 | #include <asm/machdep.h> | ||
21 | #include <asm/pmac_feature.h> | ||
22 | #include <asm/pci-bridge.h> | ||
23 | #include <asm/prom.h> | ||
24 | #endif | ||
25 | |||
26 | #ifndef CONFIG_PCI | 17 | #ifndef CONFIG_PCI |
27 | #error "This file is PCI bus glue. CONFIG_PCI must be defined." | 18 | #error "This file is PCI bus glue. CONFIG_PCI must be defined." |
28 | #endif | 19 | #endif |
@@ -115,39 +106,12 @@ ohci_pci_start (struct usb_hcd *hcd) | |||
115 | static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | 106 | static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) |
116 | { | 107 | { |
117 | /* root hub was already suspended */ | 108 | /* root hub was already suspended */ |
118 | |||
119 | /* FIXME these PMAC things get called in the wrong places. ASIC | ||
120 | * clocks should be turned off AFTER entering D3, and on BEFORE | ||
121 | * trying to enter D0. Evidently the PCI layer doesn't currently | ||
122 | * provide the right sort of platform hooks for this ... | ||
123 | */ | ||
124 | #ifdef CONFIG_PPC_PMAC | ||
125 | if (_machine == _MACH_Pmac) { | ||
126 | struct device_node *of_node; | ||
127 | |||
128 | /* Disable USB PAD & cell clock */ | ||
129 | of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller)); | ||
130 | if (of_node) | ||
131 | pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0); | ||
132 | } | ||
133 | #endif /* CONFIG_PPC_PMAC */ | ||
134 | return 0; | 109 | return 0; |
135 | } | 110 | } |
136 | 111 | ||
137 | 112 | ||
138 | static int ohci_pci_resume (struct usb_hcd *hcd) | 113 | static int ohci_pci_resume (struct usb_hcd *hcd) |
139 | { | 114 | { |
140 | #ifdef CONFIG_PPC_PMAC | ||
141 | if (_machine == _MACH_Pmac) { | ||
142 | struct device_node *of_node; | ||
143 | |||
144 | /* Re-enable USB PAD & cell clock */ | ||
145 | of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller)); | ||
146 | if (of_node) | ||
147 | pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1); | ||
148 | } | ||
149 | #endif /* CONFIG_PPC_PMAC */ | ||
150 | |||
151 | usb_hcd_resume_root_hub(hcd); | 115 | usb_hcd_resume_root_hub(hcd); |
152 | return 0; | 116 | return 0; |
153 | } | 117 | } |