UPSTREAM: usb: dwc3: core: add helper to extract trb type
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 14 Apr 2016 13:05:54 +0000 (16:05 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
This helper will be used later to convert trb type
into a human-readable string for debugfs.

Change-Id: I00ef9c5270465765bf0e03209172359f32368527
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit b058f3e8a3991ba3ea3504fea1faf81974cf17fa)

drivers/usb/dwc3/core.h

index 2705924c3516ab4471e1d2379a05aacc7e0c4be2..85256ba70c1e134cd00fd0f31c7b12fbbb9fcaad 100644 (file)
@@ -578,6 +578,7 @@ enum dwc3_link_state {
 #define DWC3_TRB_CTRL_IOC              (1 << 11)
 #define DWC3_TRB_CTRL_SID_SOFN(n)      (((n) & 0xffff) << 14)
 
+#define DWC3_TRBCTL_TYPE(n)            ((n) & (0x3f << 4))
 #define DWC3_TRBCTL_NORMAL             DWC3_TRB_CTRL_TRBCTL(1)
 #define DWC3_TRBCTL_CONTROL_SETUP      DWC3_TRB_CTRL_TRBCTL(2)
 #define DWC3_TRBCTL_CONTROL_STATUS2    DWC3_TRB_CTRL_TRBCTL(3)