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.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 3d69c4b2b542..de3d6e3e57be 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -362,8 +362,10 @@ struct xhci_op_regs {
362 * Timeout can be up to 127us. 0xFF means an infinite timeout. 362 * Timeout can be up to 127us. 0xFF means an infinite timeout.
363 */ 363 */
364#define PORT_U1_TIMEOUT(p) ((p) & 0xff) 364#define PORT_U1_TIMEOUT(p) ((p) & 0xff)
365#define PORT_U1_TIMEOUT_MASK 0xff
365/* Inactivity timer value for transitions into U2 */ 366/* Inactivity timer value for transitions into U2 */
366#define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8) 367#define PORT_U2_TIMEOUT(p) (((p) & 0xff) << 8)
368#define PORT_U2_TIMEOUT_MASK (0xff << 8)
367/* Bits 24:31 for port testing */ 369/* Bits 24:31 for port testing */
368 370
369/* USB2 Protocol PORTSPMSC */ 371/* USB2 Protocol PORTSPMSC */
@@ -914,6 +916,8 @@ struct xhci_virt_device {
914 u8 real_port; 916 u8 real_port;
915 struct xhci_interval_bw_table *bw_table; 917 struct xhci_interval_bw_table *bw_table;
916 struct xhci_tt_bw_info *tt_info; 918 struct xhci_tt_bw_info *tt_info;
919 /* The current max exit latency for the enabled USB3 link states. */
920 u16 current_mel;
917}; 921};
918 922
919/* 923/*
@@ -1362,6 +1366,8 @@ struct xhci_bus_state {
1362 u32 suspended_ports; 1366 u32 suspended_ports;
1363 u32 port_remote_wakeup; 1367 u32 port_remote_wakeup;
1364 unsigned long resume_done[USB_MAXCHILDREN]; 1368 unsigned long resume_done[USB_MAXCHILDREN];
1369 /* which ports have started to resume */
1370 unsigned long resuming_ports;
1365}; 1371};
1366 1372
1367static inline unsigned int hcd_index(struct usb_hcd *hcd) 1373static inline unsigned int hcd_index(struct usb_hcd *hcd)
@@ -1422,6 +1428,8 @@ struct xhci_hcd {
1422 /* slot enabling and address device helpers */ 1428 /* slot enabling and address device helpers */
1423 struct completion addr_dev; 1429 struct completion addr_dev;
1424 int slot_id; 1430 int slot_id;
1431 /* For USB 3.0 LPM enable/disable. */
1432 struct xhci_command *lpm_command;
1425 /* Internal mirror of the HW's dcbaa */ 1433 /* Internal mirror of the HW's dcbaa */
1426 struct xhci_virt_device *devs[MAX_HC_SLOTS]; 1434 struct xhci_virt_device *devs[MAX_HC_SLOTS];
1427 /* For keeping track of bandwidth domains per roothub. */ 1435 /* For keeping track of bandwidth domains per roothub. */
@@ -1479,6 +1487,9 @@ struct xhci_hcd {
1479#define XHCI_RESET_ON_RESUME (1 << 7) 1487#define XHCI_RESET_ON_RESUME (1 << 7)
1480#define XHCI_SW_BW_CHECKING (1 << 8) 1488#define XHCI_SW_BW_CHECKING (1 << 8)
1481#define XHCI_AMD_0x96_HOST (1 << 9) 1489#define XHCI_AMD_0x96_HOST (1 << 9)
1490#define XHCI_TRUST_TX_LENGTH (1 << 10)
1491#define XHCI_LPM_SUPPORT (1 << 11)
1492#define XHCI_INTEL_HOST (1 << 12)
1482 unsigned int num_active_eps; 1493 unsigned int num_active_eps;
1483 unsigned int limit_active_eps; 1494 unsigned int limit_active_eps;
1484 /* There are two roothubs to keep track of bus suspend info for */ 1495 /* There are two roothubs to keep track of bus suspend info for */
@@ -1752,7 +1763,7 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
1752int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1763int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1753 u32 slot_id, bool command_must_succeed); 1764 u32 slot_id, bool command_must_succeed);
1754int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, 1765int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr,
1755 u32 slot_id); 1766 u32 slot_id, bool command_must_succeed);
1756int xhci_queue_reset_ep(struct xhci_hcd *xhci, int slot_id, 1767int xhci_queue_reset_ep(struct xhci_hcd *xhci, int slot_id,
1757 unsigned int ep_index); 1768 unsigned int ep_index);
1758int xhci_queue_reset_device(struct xhci_hcd *xhci, u32 slot_id); 1769int xhci_queue_reset_device(struct xhci_hcd *xhci, u32 slot_id);
@@ -1776,6 +1787,10 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
1776/* xHCI roothub code */ 1787/* xHCI roothub code */
1777void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array, 1788void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,
1778 int port_id, u32 link_state); 1789 int port_id, u32 link_state);
1790int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd,
1791 struct usb_device *udev, enum usb3_link_state state);
1792int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd,
1793 struct usb_device *udev, enum usb3_link_state state);
1779void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array, 1794void xhci_test_and_clear_bit(struct xhci_hcd *xhci, __le32 __iomem **port_array,
1780 int port_id, u32 port_bit); 1795 int port_id, u32 port_bit);
1781int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1796int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,