diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-04-27 22:57:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:48 -0400 |
commit | 0f2a79300a1471cf92ab43af165ea13555c8b0a5 (patch) | |
tree | a46c63777a6040708500aefdbc31e0a0404d2e4a /drivers/usb/host/xhci.h | |
parent | 7206b00164a1c3ca533e01db285955617e1019f8 (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.h | 11 |
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); | |||
1024 | void handle_event(struct xhci_hcd *xhci); | 1030 | void handle_event(struct xhci_hcd *xhci); |
1025 | void set_hc_event_deq(struct xhci_hcd *xhci); | 1031 | void set_hc_event_deq(struct xhci_hcd *xhci); |
1026 | 1032 | ||
1033 | /* xHCI roothub code */ | ||
1034 | int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, | ||
1035 | char *buf, u16 wLength); | ||
1036 | int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); | ||
1037 | |||
1027 | #endif /* __LINUX_XHCI_HCD_H */ | 1038 | #endif /* __LINUX_XHCI_HCD_H */ |