diff options
author | Bin Liu <b-liu@ti.com> | 2016-06-30 12:12:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-07-17 08:23:57 +0900 |
commit | 8ccb49dd5cdeb7bc1c12580698ffec9619fea14d (patch) | |
tree | 33291a3b0bd953a512cac6ecdeb494660b33db41 /drivers/usb/musb/musb_trace.h | |
parent | 239d2218108a5af7f6ffbd0752677ab46f8705be (diff) | |
download | talos-obmc-linux-8ccb49dd5cdeb7bc1c12580698ffec9619fea14d.tar.gz talos-obmc-linux-8ccb49dd5cdeb7bc1c12580698ffec9619fea14d.zip |
usb: musb: cppi41: add dma channel tracepoints
Add tracepoints for cppi41 dma channels.
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/musb_trace.h')
-rw-r--r-- | drivers/usb/musb/musb_trace.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_trace.h b/drivers/usb/musb/musb_trace.h index 27d1a9b3efc8..f031c9e74322 100644 --- a/drivers/usb/musb/musb_trace.h +++ b/drivers/usb/musb/musb_trace.h @@ -25,6 +25,9 @@ #include <linux/tracepoint.h> #include <linux/usb.h> #include "musb_core.h" +#ifdef CONFIG_USB_TI_CPPI41_DMA +#include "cppi_dma.h" +#endif #define MUSB_MSG_MAX 500 @@ -288,6 +291,73 @@ DEFINE_EVENT(musb_req, musb_req_deq, TP_ARGS(req) ); +#ifdef CONFIG_USB_TI_CPPI41_DMA +DECLARE_EVENT_CLASS(musb_cppi41, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch), + TP_STRUCT__entry( + __field(struct cppi41_dma_channel *, ch) + __string(name, dev_name(ch->hw_ep->musb->controller)) + __field(u8, hwep) + __field(u8, port) + __field(u8, is_tx) + __field(u32, len) + __field(u32, prog_len) + __field(u32, xferred) + ), + TP_fast_assign( + __entry->ch = ch; + __assign_str(name, dev_name(ch->hw_ep->musb->controller)); + __entry->hwep = ch->hw_ep->epnum; + __entry->port = ch->port_num; + __entry->is_tx = ch->is_tx; + __entry->len = ch->total_len; + __entry->prog_len = ch->prog_len; + __entry->xferred = ch->transferred; + ), + TP_printk("%s: %p, hwep%d ch%d%s, prog_len %d, len %d/%d", + __get_str(name), __entry->ch, __entry->hwep, + __entry->port, __entry->is_tx ? "tx" : "rx", + __entry->prog_len, __entry->xferred, __entry->len + ) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_done, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_gb, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_config, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_cont, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_alloc, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_abort, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); + +DEFINE_EVENT(musb_cppi41, musb_cppi41_free, + TP_PROTO(struct cppi41_dma_channel *ch), + TP_ARGS(ch) +); +#endif /* CONFIG_USB_TI_CPPI41_DMA */ + #endif /* __MUSB_TRACE_H */ /* this part has to be here */ |