aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2010-10-14 10:23:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:22:13 -0400
commit561925318725a41189a69f36ebe99199b3fb84c4 (patch)
treee84c72692f8fd9ed67c298db17d26ccb9970a7a8 /drivers/usb/host/xhci.h
parentbe88fe4f4dda93e3264a887745123b1e6c4a6845 (diff)
USB: xHCI: port remote wakeup implementation
This commit implements port remote wakeup. When a port is in U3 state and resume signaling is detected from a device, the port transitions to the Resume state, and the xHC generates a Port Status Change Event. For USB3 port, software write a '0' to the PLS field to complete the resume signaling. For USB2 port, the resume should be signaling for at least 20ms, irq handler set a timer for port remote wakeup, and then finishes process in hub_control GetPortStatus. Some codes are borrowed from EHCI code. 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 73e5db3e89c9..ca4a923dc810 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1215,6 +1215,7 @@ struct xhci_hcd {
1215 u32 port_c_suspend[8]; /* port suspend change*/ 1215 u32 port_c_suspend[8]; /* port suspend change*/
1216 u32 suspended_ports[8]; /* which ports are 1216 u32 suspended_ports[8]; /* which ports are
1217 suspended */ 1217 suspended */
1218 unsigned long resume_done[MAX_HC_PORTS];
1218}; 1219};
1219 1220
1220/* For testing purposes */ 1221/* For testing purposes */
@@ -1459,6 +1460,9 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
1459int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1460int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1460 char *buf, u16 wLength); 1461 char *buf, u16 wLength);
1461int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 1462int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1463u32 xhci_port_state_to_neutral(u32 state);
1464int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
1465void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
1462 1466
1463/* xHCI contexts */ 1467/* xHCI contexts */
1464struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); 1468struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);