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[%zu]",
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[%zu] <= {%*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[%zu] %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",
125 TRACE_EVENT(fsi_master_scan
,
126 TP_PROTO(const struct fsi_master
*master
, bool scan
),
127 TP_ARGS(master
, scan
),
129 __field(int, master_idx
)
130 __field(int, n_links
)
134 __entry
->master_idx
= master
->idx
;
135 __entry
->n_links
= master
->n_links
;
136 __entry
->scan
= scan
;
138 TP_printk("fsi%d (%d links) %s", __entry
->master_idx
, __entry
->n_links
,
139 __entry
->scan
? "scan" : "unscan")
142 TRACE_EVENT(fsi_master_unregister
,
143 TP_PROTO(const struct fsi_master
*master
),
146 __field(int, master_idx
)
147 __field(int, n_links
)
150 __entry
->master_idx
= master
->idx
;
151 __entry
->n_links
= master
->n_links
;
153 TP_printk("fsi%d (%d links)", __entry
->master_idx
, __entry
->n_links
)
156 TRACE_EVENT(fsi_slave_init
,
157 TP_PROTO(const struct fsi_slave
*slave
),
160 __field(int, master_idx
)
161 __field(int, master_n_links
)
164 __field(int, chip_id
)
165 __field(__u32
, cfam_id
)
169 __entry
->master_idx
= slave
->master
->idx
;
170 __entry
->master_n_links
= slave
->master
->n_links
;
171 __entry
->idx
= slave
->cdev_idx
;
172 __entry
->link
= slave
->link
;
173 __entry
->chip_id
= slave
->chip_id
;
174 __entry
->cfam_id
= slave
->cfam_id
;
175 __entry
->size
= slave
->size
;
177 TP_printk("fsi%d: idx:%d link:%d/%d cid:%d cfam:%08x %08x",
181 __entry
->master_n_links
,
188 TRACE_EVENT(fsi_slave_invalid_cfam
,
189 TP_PROTO(const struct fsi_master
*master
, int link
, uint32_t cfam_id
),
190 TP_ARGS(master
, link
, cfam_id
),
192 __field(int, master_idx
)
193 __field(int, master_n_links
)
195 __field(__u32
, cfam_id
)
198 __entry
->master_idx
= master
->idx
;
199 __entry
->master_n_links
= master
->n_links
;
200 __entry
->link
= link
;
201 __entry
->cfam_id
= cfam_id
;
203 TP_printk("fsi%d: cfam:%08x link:%d/%d",
207 __entry
->master_n_links
211 TRACE_EVENT(fsi_dev_init
,
212 TP_PROTO(const struct fsi_device
*dev
),
215 __field(int, master_idx
)
219 __field(int, version
)
224 __entry
->master_idx
= dev
->slave
->master
->idx
;
225 __entry
->link
= dev
->slave
->link
;
226 __entry
->type
= dev
->engine_type
;
227 __entry
->unit
= dev
->unit
;
228 __entry
->version
= dev
->version
;
229 __entry
->addr
= dev
->addr
;
230 __entry
->size
= dev
->size
;
232 TP_printk("fsi%d: slv%d: t:%02x u:%02x v:%02x %08x@%08x",
243 #endif /* _TRACE_FSI_H */
245 #include <trace/define_trace.h>