aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-04-27 22:57:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:48 -0400
commit0f2a79300a1471cf92ab43af165ea13555c8b0a5 (patch)
treea46c63777a6040708500aefdbc31e0a0404d2e4a /drivers/usb/host/xhci.h
parent7206b00164a1c3ca533e01db285955617e1019f8 (diff)
USB: xhci: Root hub support.
Add functionality for getting port status and hub descriptor for xHCI root hubs. This is WIP because the USB 3.0 hub descriptor is different from the USB 2.0 hub descriptor. For now, we lie about the root hub descriptor because the changes won't effect how the core talks to the root hub. Later we will need to add the USB 3.0 hub descriptor for real hubs, and this code might change. 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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 66be134b8921..059c659d3f39 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -35,6 +35,8 @@
35 35
36/* Max number of USB devices for any host controller - limit in section 6.1 */ 36/* Max number of USB devices for any host controller - limit in section 6.1 */
37#define MAX_HC_SLOTS 256 37#define MAX_HC_SLOTS 256
38/* Section 5.3.3 - MaxPorts */
39#define MAX_HC_PORTS 127
38 40
39/* 41/*
40 * xHCI register interface. 42 * xHCI register interface.
@@ -710,6 +712,10 @@ struct xhci_event_cmd {
710} __attribute__ ((packed)); 712} __attribute__ ((packed));
711 713
712 714
715/* Port Status Change Event TRB fields */
716/* Port ID - bits 31:24 */
717#define GET_PORT_ID(p) (((p) & (0xff << 24)) >> 24)
718
713/* Normal TRB fields */ 719/* Normal TRB fields */
714/* transfer_len bitmasks - bits 0:16 */ 720/* transfer_len bitmasks - bits 0:16 */
715#define TRB_LEN(p) ((p) & 0x1ffff) 721#define TRB_LEN(p) ((p) & 0x1ffff)
@@ -1024,4 +1030,9 @@ void *setup_one_noop(struct xhci_hcd *xhci);
1024void handle_event(struct xhci_hcd *xhci); 1030void handle_event(struct xhci_hcd *xhci);
1025void set_hc_event_deq(struct xhci_hcd *xhci); 1031void set_hc_event_deq(struct xhci_hcd *xhci);
1026 1032
1033/* xHCI roothub code */
1034int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1035 char *buf, u16 wLength);
1036int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1037
1027#endif /* __LINUX_XHCI_HCD_H */ 1038#endif /* __LINUX_XHCI_HCD_H */