diff options
author | Jun Li <r65092@freescale.com> | 2009-12-01 21:13:48 +0800 |
---|---|---|
committer | Jun Li <r65092@freescale.com> | 2009-12-03 18:18:36 +0800 |
commit | 9a3dd2536ccf1bb0aa5610b18a897d687d2ef3ac (patch) | |
tree | 413a79ae0dd5e3609c3515ef339d050b46e854c8 /drivers/usb/host/ehci-hub.c | |
parent | f0a0d65e63e8fafee8d07aa13d598e30261ad9d0 (diff) |
ENGR00117147-1 USB clock gating and PHY low power mode.
If there is no usb devices connectted or all connectted usb
devices are in suspend state, usb host can suspend its whole bus,
then put the PHY into low power mode and close all usb clocks.
(The patch is splitted 2 patches, this is common code part.)
Signed-off-by: Li Jun <r65092@freescale.com>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 615d263c57c1..de459bbd1eb1 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -151,9 +151,12 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) } /* enable remote wakeup on all ports */ - if (hcd->self.root_hub->do_remote_wakeup) - t2 |= PORT_WAKE_BITS; - else + if (hcd->self.root_hub->do_remote_wakeup) { + if (t1 & PORT_CONNECT) + t2 |= PORT_WKOC_E|PORT_WKDISC_E; + else + t2 |= PORT_WKOC_E|PORT_WKCONN_E; + } else t2 &= ~PORT_WAKE_BITS; if (t1 != t2) { |