summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/trace.h
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-09-30 15:52:19 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-03 10:38:30 +0200
commit4dd5a69e495b71491bb21c273b6d5a979e2f685b (patch)
tree4c2b52340393aebf53b4d4f13a3ccbf42430d34b /drivers/usb/dwc3/trace.h
parentba1773fb7de92498d3cd51a1cb5a8855b8996912 (diff)
downloadblackbird-op-linux-4dd5a69e495b71491bb21c273b6d5a979e2f685b.tar.gz
blackbird-op-linux-4dd5a69e495b71491bb21c273b6d5a979e2f685b.zip
usb: dwc3: trace: add a proper tracepoint for reg accessors
We want to reduce the usage of dwc3_trace() in favor of proper tracepoints which can be enabled/disabled by the user. Let's start with our register accessors. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/trace.h')
-rw-r--r--drivers/usb/dwc3/trace.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h
index 88ddd01c42af..b2153f231cf0 100644
--- a/drivers/usb/dwc3/trace.h
+++ b/drivers/usb/dwc3/trace.h
@@ -37,29 +37,46 @@ DECLARE_EVENT_CLASS(dwc3_log_msg,
TP_printk("%s", __get_str(msg))
);
-DEFINE_EVENT(dwc3_log_msg, dwc3_readl,
+DEFINE_EVENT(dwc3_log_msg, dwc3_gadget,
TP_PROTO(struct va_format *vaf),
TP_ARGS(vaf)
);
-DEFINE_EVENT(dwc3_log_msg, dwc3_writel,
+DEFINE_EVENT(dwc3_log_msg, dwc3_core,
TP_PROTO(struct va_format *vaf),
TP_ARGS(vaf)
);
-DEFINE_EVENT(dwc3_log_msg, dwc3_gadget,
+DEFINE_EVENT(dwc3_log_msg, dwc3_ep0,
TP_PROTO(struct va_format *vaf),
TP_ARGS(vaf)
);
-DEFINE_EVENT(dwc3_log_msg, dwc3_core,
- TP_PROTO(struct va_format *vaf),
- TP_ARGS(vaf)
+DECLARE_EVENT_CLASS(dwc3_log_io,
+ TP_PROTO(void *base, u32 offset, u32 value),
+ TP_ARGS(base, offset, value),
+ TP_STRUCT__entry(
+ __field(void *, base)
+ __field(u32, offset)
+ __field(u32, value)
+ ),
+ TP_fast_assign(
+ __entry->base = base;
+ __entry->offset = offset;
+ __entry->value = value;
+ ),
+ TP_printk("addr %p value %08x", __entry->base + __entry->offset,
+ __entry->value)
);
-DEFINE_EVENT(dwc3_log_msg, dwc3_ep0,
- TP_PROTO(struct va_format *vaf),
- TP_ARGS(vaf)
+DEFINE_EVENT(dwc3_log_io, dwc3_readl,
+ TP_PROTO(void *base, u32 offset, u32 value),
+ TP_ARGS(base, offset, value)
+);
+
+DEFINE_EVENT(dwc3_log_io, dwc3_writel,
+ TP_PROTO(void *base, u32 offset, u32 value),
+ TP_ARGS(base, offset, value)
);
DECLARE_EVENT_CLASS(dwc3_log_event,
OpenPOWER on IntegriCloud