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.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 07e263063e37..ba1be6b7cc6d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -30,6 +30,7 @@
30 30
31/* Code sharing between pci-quirks and xhci hcd */ 31/* Code sharing between pci-quirks and xhci hcd */
32#include "xhci-ext-caps.h" 32#include "xhci-ext-caps.h"
33#include "pci-quirks.h"
33 34
34/* xHCI PCI Configuration Registers */ 35/* xHCI PCI Configuration Registers */
35#define XHCI_SBRN_OFFSET (0x60) 36#define XHCI_SBRN_OFFSET (0x60)
@@ -232,7 +233,7 @@ struct xhci_op_regs {
232 * notification type that matches a bit set in this bit field. 233 * notification type that matches a bit set in this bit field.
233 */ 234 */
234#define DEV_NOTE_MASK (0xffff) 235#define DEV_NOTE_MASK (0xffff)
235#define ENABLE_DEV_NOTE(x) (1 << x) 236#define ENABLE_DEV_NOTE(x) (1 << (x))
236/* Most of the device notification types should only be used for debug. 237/* Most of the device notification types should only be used for debug.
237 * SW does need to pay attention to function wake notifications. 238 * SW does need to pay attention to function wake notifications.
238 */ 239 */
@@ -348,6 +349,9 @@ struct xhci_op_regs {
348/* Initiate a warm port reset - complete when PORT_WRC is '1' */ 349/* Initiate a warm port reset - complete when PORT_WRC is '1' */
349#define PORT_WR (1 << 31) 350#define PORT_WR (1 << 31)
350 351
352/* We mark duplicate entries with -1 */
353#define DUPLICATE_ENTRY ((u8)(-1))
354
351/* Port Power Management Status and Control - port_power_base bitmasks */ 355/* Port Power Management Status and Control - port_power_base bitmasks */
352/* Inactivity timer value for transitions into U1, in microseconds. 356/* Inactivity timer value for transitions into U1, in microseconds.
353 * Timeout can be up to 127us. 0xFF means an infinite timeout. 357 * Timeout can be up to 127us. 0xFF means an infinite timeout.
@@ -601,11 +605,11 @@ struct xhci_ep_ctx {
601#define EP_STATE_STOPPED 3 605#define EP_STATE_STOPPED 3
602#define EP_STATE_ERROR 4 606#define EP_STATE_ERROR 4
603/* Mult - Max number of burtst within an interval, in EP companion desc. */ 607/* Mult - Max number of burtst within an interval, in EP companion desc. */
604#define EP_MULT(p) ((p & 0x3) << 8) 608#define EP_MULT(p) (((p) & 0x3) << 8)
605/* bits 10:14 are Max Primary Streams */ 609/* bits 10:14 are Max Primary Streams */
606/* bit 15 is Linear Stream Array */ 610/* bit 15 is Linear Stream Array */
607/* Interval - period between requests to an endpoint - 125u increments. */ 611/* Interval - period between requests to an endpoint - 125u increments. */
608#define EP_INTERVAL(p) ((p & 0xff) << 16) 612#define EP_INTERVAL(p) (((p) & 0xff) << 16)
609#define EP_INTERVAL_TO_UFRAMES(p) (1 << (((p) >> 16) & 0xff)) 613#define EP_INTERVAL_TO_UFRAMES(p) (1 << (((p) >> 16) & 0xff))
610#define EP_MAXPSTREAMS_MASK (0x1f << 10) 614#define EP_MAXPSTREAMS_MASK (0x1f << 10)
611#define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK) 615#define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK)
@@ -1276,6 +1280,7 @@ struct xhci_hcd {
1276#define XHCI_LINK_TRB_QUIRK (1 << 0) 1280#define XHCI_LINK_TRB_QUIRK (1 << 0)
1277#define XHCI_RESET_EP_QUIRK (1 << 1) 1281#define XHCI_RESET_EP_QUIRK (1 << 1)
1278#define XHCI_NEC_HOST (1 << 2) 1282#define XHCI_NEC_HOST (1 << 2)
1283#define XHCI_AMD_PLL_FIX (1 << 3)
1279 /* There are two roothubs to keep track of bus suspend info for */ 1284 /* There are two roothubs to keep track of bus suspend info for */
1280 struct xhci_bus_state bus_state[2]; 1285 struct xhci_bus_state bus_state[2];
1281 /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */ 1286 /* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */