summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/debugfs.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2017-03-31 14:44:09 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-04-11 10:58:26 +0300
commitb5c7ed5cca82991335ae3a66428a791acc8aa7e9 (patch)
tree1906d55004e8d7a841ff0f60cc59bb5f9b4f163e /drivers/usb/dwc3/debugfs.c
parent90abb425d9493d00a49b65114dcb0f7266ba64da (diff)
downloadlinux-b5c7ed5cca82991335ae3a66428a791acc8aa7e9.tar.xz
usb: dwc3: expose dwc3_trb_type_string()
That helper can be used from our tracepoint interface with very minor edits. Let's do so. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/debugfs.c')
-rw-r--r--drivers/usb/dwc3/debugfs.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index 3606c28be580..b53ca3b0171a 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -644,30 +644,6 @@ out:
return 0;
}
-static inline const char *dwc3_trb_type_string(struct dwc3_trb *trb)
-{
- switch (DWC3_TRBCTL_TYPE(trb->ctrl)) {
- case DWC3_TRBCTL_NORMAL:
- return "normal";
- case DWC3_TRBCTL_CONTROL_SETUP:
- return "setup";
- case DWC3_TRBCTL_CONTROL_STATUS2:
- return "status2";
- case DWC3_TRBCTL_CONTROL_STATUS3:
- return "status3";
- case DWC3_TRBCTL_CONTROL_DATA:
- return "data";
- case DWC3_TRBCTL_ISOCHRONOUS_FIRST:
- return "isoc-first";
- case DWC3_TRBCTL_ISOCHRONOUS:
- return "isoc";
- case DWC3_TRBCTL_LINK_TRB:
- return "link";
- default:
- return "UNKNOWN";
- }
-}
-
static int dwc3_ep_trb_ring_show(struct seq_file *s, void *unused)
{
struct dwc3_ep *dep = s->private;
@@ -688,10 +664,11 @@ static int dwc3_ep_trb_ring_show(struct seq_file *s, void *unused)
for (i = 0; i < DWC3_TRB_NUM; i++) {
struct dwc3_trb *trb = &dep->trb_pool[i];
+ unsigned int type = DWC3_TRBCTL_TYPE(trb->ctrl);
seq_printf(s, "%08x%08x,%d,%s,%d,%d,%d,%d,%d,%d\n",
trb->bph, trb->bpl, trb->size,
- dwc3_trb_type_string(trb),
+ dwc3_trb_type_string(type),
!!(trb->ctrl & DWC3_TRB_CTRL_IOC),
!!(trb->ctrl & DWC3_TRB_CTRL_ISP_IMI),
!!(trb->ctrl & DWC3_TRB_CTRL_CSP),