aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-pci.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-01-23 18:28:07 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:56 -0500
commit6a9062f393fa48125df23c5491543828a21e1ae0 (patch)
treeca79e036f5a00253af790b45da6a6102b58ff97c /drivers/usb/host/ohci-pci.c
parentb1e8f0a6a8805c971857cd10a65cf8caa4c1a672 (diff)
[PATCH] USB: ohci uses driver model wakeup flags
This makes OHCI use the driver model wakeup control bits for its root hub (e.g. disable on amd756, because of chip erratum) and for the controller itself. It no longer uses the hcd glue bits with those roles, and depends on the previous patch making the root hub available earlier. Note that on most platforms (boot code properly setting the RWC bit) this gives a partial workaround for the way PCI isn't currently flagging devices that support PME# signals. (Because of odd PCI init sequencing on PPC.) That's because many OHCI controllers support "legacy PCI PM" ... without involving any PCI PM capability. USB wakeup from STR, if it works on your system, may still involve tweaking things by hand in /proc/acpi/wakeup. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r--drivers/usb/host/ohci-pci.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 1b09dde068e1..1bfe96f4d045 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -35,7 +35,10 @@ ohci_pci_start (struct usb_hcd *hcd)
35 struct ohci_hcd *ohci = hcd_to_ohci (hcd); 35 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
36 int ret; 36 int ret;
37 37
38 if(hcd->self.controller && hcd->self.controller->bus == &pci_bus_type) { 38 /* REVISIT this whole block should move to reset(), which handles
39 * all the other one-time init.
40 */
41 if (hcd->self.controller) {
39 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 42 struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
40 43
41 /* AMD 756, for most chips (early revs), corrupts register 44 /* AMD 756, for most chips (early revs), corrupts register
@@ -45,7 +48,8 @@ ohci_pci_start (struct usb_hcd *hcd)
45 && pdev->device == 0x740c) { 48 && pdev->device == 0x740c) {
46 ohci->flags = OHCI_QUIRK_AMD756; 49 ohci->flags = OHCI_QUIRK_AMD756;
47 ohci_dbg (ohci, "AMD756 erratum 4 workaround\n"); 50 ohci_dbg (ohci, "AMD756 erratum 4 workaround\n");
48 // also somewhat erratum 10 (suspend/resume issues) 51 /* also erratum 10 (suspend/resume issues) */
52 device_init_wakeup(&hcd->self.root_hub->dev, 0);
49 } 53 }
50 54
51 /* FIXME for some of the early AMD 760 southbridges, OHCI 55 /* FIXME for some of the early AMD 760 southbridges, OHCI
@@ -88,6 +92,13 @@ ohci_pci_start (struct usb_hcd *hcd)
88 ohci_dbg (ohci, 92 ohci_dbg (ohci,
89 "enabled Compaq ZFMicro chipset quirk\n"); 93 "enabled Compaq ZFMicro chipset quirk\n");
90 } 94 }
95
96 /* RWC may not be set for add-in PCI cards, since boot
97 * firmware probably ignored them. This transfers PCI
98 * PM wakeup capabilities (once the PCI layer is fixed).
99 */
100 if (device_may_wakeup(&pdev->dev))
101 ohci->hc_control |= OHCI_CTRL_RWC;
91 } 102 }
92 103
93 /* NOTE: there may have already been a first reset, to 104 /* NOTE: there may have already been a first reset, to