aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2010-10-14 10:23:03 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:22:13 -0400
commit9777e3ce907d4cb5a513902a87ecd03b52499569 (patch)
treea2b28eeeaddd39d7c8cdd59f6ddbfa694d40d5ba /drivers/usb/host/xhci.h
parent561925318725a41189a69f36ebe99199b3fb84c4 (diff)
USB: xHCI: bus power management implementation
This patch implements xHCI bus suspend/resume function hook. In the patch it goes through all the ports and suspend/resume the ports if needed. If any port is in remote wakeup, abort bus suspend as what ehci/ohci do. Signed-off-by: Libin Yang <libin.yang@amd.com> Signed-off-by: Crane Cai <crane.cai@amd.com> Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index ca4a923dc810..196e21fb36ff 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -357,6 +357,8 @@ struct xhci_op_regs {
357#define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8) 357#define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8)
358/* Bits 24:31 for port testing */ 358/* Bits 24:31 for port testing */
359 359
360/* USB2 Protocol PORTSPMSC */
361#define PORT_RWE (1 << 0x3)
360 362
361/** 363/**
362 * struct xhci_intr_reg - Interrupt Register Set 364 * struct xhci_intr_reg - Interrupt Register Set
@@ -1191,6 +1193,11 @@ struct xhci_hcd {
1191#endif 1193#endif
1192 /* Host controller watchdog timer structures */ 1194 /* Host controller watchdog timer structures */
1193 unsigned int xhc_state; 1195 unsigned int xhc_state;
1196
1197 unsigned long bus_suspended;
1198 unsigned long next_statechange;
1199
1200 u32 command;
1194/* Host controller is dying - not responding to commands. "I'm not dead yet!" 1201/* Host controller is dying - not responding to commands. "I'm not dead yet!"
1195 * 1202 *
1196 * xHC interrupts have been disabled and a watchdog timer will (or has already) 1203 * xHC interrupts have been disabled and a watchdog timer will (or has already)
@@ -1460,6 +1467,8 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
1460int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1467int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1461 char *buf, u16 wLength); 1468 char *buf, u16 wLength);
1462int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 1469int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1470int xhci_bus_suspend(struct usb_hcd *hcd);
1471int xhci_bus_resume(struct usb_hcd *hcd);
1463u32 xhci_port_state_to_neutral(u32 state); 1472u32 xhci_port_state_to_neutral(u32 state);
1464int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port); 1473int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
1465void xhci_ring_device(struct xhci_hcd *xhci, int slot_id); 1474void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);