]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: xhci: convert to TRB_TX_TYPE()
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Tue, 8 Sep 2020 17:00:01 +0000 (19:00 +0200)
committerMarek Vasut <marex@denx.de>
Thu, 1 Oct 2020 17:43:05 +0000 (19:43 +0200)
Use TRB_TX_TYPE() instead of (TRB_DATA_OUT/IN << TRB_TX_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/usb/host/xhci-ring.c
include/usb/xhci.h

index 9ef72efe9598001910d55bc77847c0755546828a..b118207d937b8cee557e4511cbeb5fda0b7b3ec3 100644 (file)
@@ -830,9 +830,9 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
        if (ctrl->hci_version >= 0x100 || ctrl->quirks & XHCI_MTK_HOST) {
                if (length > 0) {
                        if (req->requesttype & USB_DIR_IN)
-                               field |= (TRB_DATA_IN << TRB_TX_TYPE_SHIFT);
+                               field |= TRB_TX_TYPE(TRB_DATA_IN);
                        else
-                               field |= (TRB_DATA_OUT << TRB_TX_TYPE_SHIFT);
+                               field |= TRB_TX_TYPE(TRB_DATA_OUT);
                }
        }
 
index 35c66042baa166411124a6187ca7e67e6f4d6fa1..07b1aebc69277d1a15c3e14728e2e8beb383de48 100644 (file)
@@ -879,7 +879,6 @@ struct xhci_event_cmd {
 /* Control transfer TRB specific fields */
 #define TRB_DIR_IN             (1<<16)
 #define        TRB_TX_TYPE(p)          ((p) << 16)
-#define        TRB_TX_TYPE_SHIFT       (16)
 #define        TRB_DATA_OUT            2
 #define        TRB_DATA_IN             3