aboutsummaryrefslogtreecommitdiff
path: root/include/usb
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2020-09-08 19:00:00 +0200
committerMarek Vasut <marex@denx.de>2020-10-01 19:43:05 +0200
commit4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32 (patch)
tree54efe33c164a78b54cf9fd474e9663eaecaf3a08 /include/usb
parenta826d76f2bab971b293b4ba6bf45b81871051383 (diff)
downloadu-boot-4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32.zip
u-boot-4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32.tar.gz
u-boot-4312638eaf7f0bd29ffa8c7957bd51c5eb7d5a32.tar.bz2
usb: xhci: convert to TRB_LEN() and TRB_INTR_TARGET()
For normal TRB fields: use TRB_LEN(x) instead of ((x) & TRB_LEN_MASK); and use TRB_INTR_TARGET(x) instead of (((x) & TRB_INTR_TARGET_MASK) << TRB_INTR_TARGET_SHIFT) Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/xhci.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
index bdba51d..35c6604 100644
--- a/include/usb/xhci.h
+++ b/include/usb/xhci.h
@@ -847,12 +847,9 @@ struct xhci_event_cmd {
/* Normal TRB fields */
/* transfer_len bitmasks - bits 0:16 */
#define TRB_LEN(p) ((p) & 0x1ffff)
-#define TRB_LEN_MASK (0x1ffff)
/* TD Size, packets remaining in this TD, bits 21:17 (5 bits, so max 31) */
#define TRB_TD_SIZE(p) (min((p), (u32)31) << 17)
/* Interrupter Target - which MSI-X vector to target the completion event at */
-#define TRB_INTR_TARGET_SHIFT (22)
-#define TRB_INTR_TARGET_MASK (0x3ff)
#define TRB_INTR_TARGET(p) (((p) & 0x3ff) << 22)
#define GET_INTR_TARGET(p) (((p) >> 22) & 0x3ff)
#define TRB_TBC(p) (((p) & 0x3) << 7)