1 /* SPDX-License-Identifier: GPL-2.0 */
4 #define TRACE_SYSTEM fsi
6 #if !defined(_TRACE_FSI_H) || defined(TRACE_HEADER_MULTI_READ)
9 #include <linux/tracepoint.h>
11 TRACE_EVENT(fsi_master_read
,
12 TP_PROTO(const struct fsi_master
*master
, int link
, int id
,
13 uint32_t addr
, size_t size
),
14 TP_ARGS(master
, link
, id
, addr
, size
),
16 __field(int, master_idx
)
23 __entry
->master_idx
= master
->idx
;
29 TP_printk("fsi%d:%02d:%02d %08x[%zd]",
38 TRACE_EVENT(fsi_master_write
,
39 TP_PROTO(const struct fsi_master
*master
, int link
, int id
,
40 uint32_t addr
, size_t size
, const void *data
),
41 TP_ARGS(master
, link
, id
, addr
, size
, data
),
43 __field(int, master_idx
)
51 __entry
->master_idx
= master
->idx
;
57 memcpy(&__entry
->data
, data
, size
);
59 TP_printk("fsi%d:%02d:%02d %08x[%zd] <= {%*ph}",
65 (int)__entry
->size
, &__entry
->data
69 TRACE_EVENT(fsi_master_rw_result
,
70 TP_PROTO(const struct fsi_master
*master
, int link
, int id
,
71 uint32_t addr
, size_t size
,
72 bool write
, const void *data
, int ret
),
73 TP_ARGS(master
, link
, id
, addr
, size
, write
, data
, ret
),
75 __field(int, master_idx
)
85 __entry
->master_idx
= master
->idx
;
90 __entry
->write
= write
;
93 if (__entry
->write
|| !__entry
->ret
)
94 memcpy(&__entry
->data
, data
, size
);
96 TP_printk("fsi%d:%02d:%02d %08x[%zd] %s {%*ph} ret %d",
102 __entry
->write
? "<=" : "=>",
103 (int)__entry
->size
, &__entry
->data
,
108 TRACE_EVENT(fsi_master_break
,
109 TP_PROTO(const struct fsi_master
*master
, int link
),
110 TP_ARGS(master
, link
),
112 __field(int, master_idx
)
116 __entry
->master_idx
= master
->idx
;
117 __entry
->link
= link
;
119 TP_printk("fsi%d:%d",
126 #endif /* _TRACE_FSI_H */
128 #include <trace/define_trace.h>