summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2010-10-14 07:23:00 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:22:13 -0700
commit561925318725a41189a69f36ebe99199b3fb84c4 (patch)
treee84c72692f8fd9ed67c298db17d26ccb9970a7a8 /drivers/usb/host/xhci.h
parentbe88fe4f4dda93e3264a887745123b1e6c4a6845 (diff)
downloadlinux-561925318725a41189a69f36ebe99199b3fb84c4.tar.gz
linux-561925318725a41189a69f36ebe99199b3fb84c4.tar.bz2
linux-561925318725a41189a69f36ebe99199b3fb84c4.zip
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 {
u32 port_c_suspend[8]; /* port suspend change*/
u32 suspended_ports[8]; /* which ports are
suspended */
+ unsigned long resume_done[MAX_HC_PORTS];
};
/* For testing purposes */
@@ -1459,6 +1460,9 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
char *buf, u16 wLength);
int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
+u32 xhci_port_state_to_neutral(u32 state);
+int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
+void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
/* xHCI contexts */
struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);