]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: xhci: Correct TT_SLOT and TT_PORT macros
authorBin Meng <bmeng.cn@gmail.com>
Wed, 19 Jul 2017 13:51:20 +0000 (21:51 +0800)
committerMarek Vasut <marex@denx.de>
Fri, 28 Jul 2017 21:34:36 +0000 (23:34 +0200)
These two macros really need a parameter to make them useful.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/usb/host/xhci.h

index cdce67c1a015c3ff9cd1c2116265c7a3ed08d288..a497d9d830fa7be54b05ac79c5def17e1c3a9d04 100644 (file)
@@ -548,12 +548,12 @@ struct xhci_slot_ctx {
  * The Slot ID of the hub that isolates the high speed signaling from
  * this low or full-speed device.  '0' if attached to root hub port.
  */
-#define TT_SLOT                        (0xff)
+#define TT_SLOT(p)             (((p) & 0xff) << 0)
 /*
  * The number of the downstream facing port of the high-speed hub
  * '0' if the device is not low or full speed.
  */
-#define TT_PORT                        (0xff << 8)
+#define TT_PORT(p)             (((p) & 0xff) << 8)
 #define TT_THINK_TIME(p)       (((p) & 0x3) << 16)
 
 /* dev_state bitmasks */