Merge branch 'master' of git://git.denx.de/u-boot-spi
[platform/kernel/u-boot.git] / drivers / usb / host / xhci.h
index a497d9d..6017504 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * USB HOST XHCI Controller
  *
@@ -10,8 +11,6 @@
  * Copyright (C) 2013 Samsung Electronics Co.Ltd
  * Authors: Vivek Gautam <gautam.vivek@samsung.com>
  *         Vikas Sajjan <vikas.sajjan@samsung.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef HOST_XHCI_H_
@@ -663,8 +662,9 @@ struct xhci_ep_ctx {
 #define GET_MAX_PACKET(p)      ((p) & 0x7ff)
 
 /* tx_info bitmasks */
-#define AVG_TRB_LENGTH_FOR_EP(p)       ((p) & 0xffff)
-#define MAX_ESIT_PAYLOAD_FOR_EP(p)     (((p) & 0xffff) << 16)
+#define EP_AVG_TRB_LENGTH(p)           ((p) & 0xffff)
+#define EP_MAX_ESIT_PAYLOAD_LO(p)      (((p) & 0xffff) << 16)
+#define EP_MAX_ESIT_PAYLOAD_HI(p)      ((((p) >> 16) & 0xff) << 24)
 #define CTX_TO_MAX_ESIT_PAYLOAD(p)     (((p) >> 16) & 0xffff)
 
 /* deq bitmasks */
@@ -1045,9 +1045,9 @@ struct xhci_scratchpad {
  * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
  * meaning 64 ring segments.
  * Initial allocated size of the ERST, in number of entries */
-#define        ERST_NUM_SEGS   3
+#define        ERST_NUM_SEGS   1
 /* Initial number of event segment rings allocated */
-#define        ERST_ENTRIES    3
+#define        ERST_ENTRIES    1
 /* Initial allocated size of the ERST, in number of entries */
 #define        ERST_SIZE       64
 /* Poll every 60 seconds */
@@ -1211,7 +1211,7 @@ void xhci_hcd_stop(int index);
 #define XHCI_STS_CNR           (1 << 11)
 
 struct xhci_ctrl {
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
        struct udevice *dev;
 #endif
        struct xhci_hccr *hccr; /* R/O registers, not need for volatile */