1 /* SPDX-License-Identifier: GPL-2.0+ */
7 #define TRACE_SYSTEM fsl_edma
9 #if !defined(__LINUX_FSL_EDMA_TRACE) || defined(TRACE_HEADER_MULTI_READ)
10 #define __LINUX_FSL_EDMA_TRACE
12 #include <linux/types.h>
13 #include <linux/tracepoint.h>
15 DECLARE_EVENT_CLASS(edma_log_io
,
16 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
17 TP_ARGS(edma
, addr
, value
),
19 __field(struct fsl_edma_engine
*, edma
)
20 __field(void __iomem
*, addr
)
26 __entry
->value
= value
;
28 TP_printk("offset %08x: value %08x",
29 (u32
)(__entry
->addr
- __entry
->edma
->membase
), __entry
->value
)
32 DEFINE_EVENT(edma_log_io
, edma_readl
,
33 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
34 TP_ARGS(edma
, addr
, value
)
37 DEFINE_EVENT(edma_log_io
, edma_writel
,
38 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
39 TP_ARGS(edma
, addr
, value
)
42 DEFINE_EVENT(edma_log_io
, edma_readw
,
43 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
44 TP_ARGS(edma
, addr
, value
)
47 DEFINE_EVENT(edma_log_io
, edma_writew
,
48 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
49 TP_ARGS(edma
, addr
, value
)
52 DEFINE_EVENT(edma_log_io
, edma_readb
,
53 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
54 TP_ARGS(edma
, addr
, value
)
57 DEFINE_EVENT(edma_log_io
, edma_writeb
,
58 TP_PROTO(struct fsl_edma_engine
*edma
, void __iomem
*addr
, u32 value
),
59 TP_ARGS(edma
, addr
, value
)
62 DECLARE_EVENT_CLASS(edma_log_tcd
,
63 TP_PROTO(struct fsl_edma_chan
*chan
, void *tcd
),
74 __field(u64
, dlast_sga
)
80 __entry
->saddr
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, saddr
),
81 __entry
->soff
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, soff
),
82 __entry
->attr
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, attr
),
83 __entry
->nbytes
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, nbytes
),
84 __entry
->slast
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, slast
),
85 __entry
->daddr
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, daddr
),
86 __entry
->doff
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, doff
),
87 __entry
->citer
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, citer
),
88 __entry
->dlast_sga
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, dlast_sga
),
89 __entry
->csr
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, csr
),
90 __entry
->biter
= fsl_edma_get_tcd_to_cpu(chan
, tcd
, biter
);
92 TP_printk("\n==== TCD =====\n"
101 " dlast: 0x%016llx\n"
117 DEFINE_EVENT(edma_log_tcd
, edma_fill_tcd
,
118 TP_PROTO(struct fsl_edma_chan
*chan
, void *tcd
),
124 /* this part must be outside header guard */
126 #undef TRACE_INCLUDE_PATH
127 #define TRACE_INCLUDE_PATH .
129 #undef TRACE_INCLUDE_FILE
130 #define TRACE_INCLUDE_FILE fsl-edma-trace
132 #include <trace/define_trace.h>