aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 34a60d9f056a..404ecbce5128 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -448,6 +448,24 @@ struct xhci_doorbell_array {
448 448
449 449
450/** 450/**
451 * struct xhci_protocol_caps
452 * @revision: major revision, minor revision, capability ID,
453 * and next capability pointer.
454 * @name_string: Four ASCII characters to say which spec this xHC
455 * follows, typically "USB ".
456 * @port_info: Port offset, count, and protocol-defined information.
457 */
458struct xhci_protocol_caps {
459 u32 revision;
460 u32 name_string;
461 u32 port_info;
462};
463
464#define XHCI_EXT_PORT_MAJOR(x) (((x) >> 24) & 0xff)
465#define XHCI_EXT_PORT_OFF(x) ((x) & 0xff)
466#define XHCI_EXT_PORT_COUNT(x) (((x) >> 8) & 0xff)
467
468/**
451 * struct xhci_container_ctx 469 * struct xhci_container_ctx
452 * @type: Type of context. Used to calculated offsets to contained contexts. 470 * @type: Type of context. Used to calculated offsets to contained contexts.
453 * @size: Size of the context data 471 * @size: Size of the context data
@@ -614,6 +632,11 @@ struct xhci_ep_ctx {
614#define MAX_PACKET_MASK (0xffff << 16) 632#define MAX_PACKET_MASK (0xffff << 16)
615#define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) 633#define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff)
616 634
635/* Get max packet size from ep desc. Bit 10..0 specify the max packet size.
636 * USB2.0 spec 9.6.6.
637 */
638#define GET_MAX_PACKET(p) ((p) & 0x7ff)
639
617/* tx_info bitmasks */ 640/* tx_info bitmasks */
618#define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff) 641#define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff)
619#define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16) 642#define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16)
@@ -1199,6 +1222,15 @@ struct xhci_hcd {
1199#define XHCI_LINK_TRB_QUIRK (1 << 0) 1222#define XHCI_LINK_TRB_QUIRK (1 << 0)
1200#define XHCI_RESET_EP_QUIRK (1 << 1) 1223#define XHCI_RESET_EP_QUIRK (1 << 1)
1201#define XHCI_NEC_HOST (1 << 2) 1224#define XHCI_NEC_HOST (1 << 2)
1225
1226 /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */
1227 u8 *port_array;
1228 /* Array of pointers to USB 3.0 PORTSC registers */
1229 u32 __iomem **usb3_ports;
1230 unsigned int num_usb3_ports;
1231 /* Array of pointers to USB 2.0 PORTSC registers */
1232 u32 __iomem **usb2_ports;
1233 unsigned int num_usb2_ports;
1202}; 1234};
1203 1235
1204/* For testing purposes */ 1236/* For testing purposes */