summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-09-18 06:40:47 -0700
committerMarek Vasut <marex@denx.de>2017-10-01 16:32:54 +0200
commitf51966bf7afe44151756e9a2432705bb56bc2007 (patch)
treeeefaa61400e609e077e12620c10239c051c4ff5a /drivers/usb/host/xhci.h
parent061895fbe57d29f50bb3c6c8609d56a668d1387d (diff)
downloadu-boot-f51966bf7afe44151756e9a2432705bb56bc2007.tar.gz
usb: xhci: Honor endpoint's interval
USB endpoint reports the period between consecutive requests to send or receive data as bInverval in its endpoint descriptor. So far this is ignored by xHCI driver and the 'Interval' field in xHC's endpoint context is always programmed to zero which means 1ms for low speed or full speed , or 125us for high speed or super speed. We should honor the interval by getting it from endpoint descriptor. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r--drivers/usb/host/xhci.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 3377450fca..ba5f650144 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -663,8 +663,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 */