diff mbox

[U-Boot,15/16] usb: xhci: Correct TT_SLOT and TT_PORT macros

Message ID 1498211673-18715-16-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Marek Vasut
Headers show

Commit Message

Bin Meng June 23, 2017, 9:54 a.m. UTC
These two macros really need a parameter to make them useful.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 drivers/usb/host/xhci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass July 6, 2017, 4:50 a.m. UTC | #1
On 23 June 2017 at 03:54, Bin Meng <bmeng.cn@gmail.com> wrote:
> These two macros really need a parameter to make them useful.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  drivers/usb/host/xhci.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index cdce67c..a497d9d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -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 */