1 
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM fsi_master_ast_cf
4 
5 #if !defined(_TRACE_FSI_MASTER_ACF_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_FSI_MASTER_ACF_H
7 
8 #include <linux/tracepoint.h>
9 
10 TRACE_EVENT(fsi_master_acf_copro_command,
11 	TP_PROTO(const struct fsi_master_acf *master, uint32_t op),
12 	TP_ARGS(master, op),
13 	TP_STRUCT__entry(
14 		__field(int,		master_idx)
15 		__field(uint32_t,	op)
16 	),
17 	TP_fast_assign(
18 		__entry->master_idx = master->master.idx;
19 		__entry->op = op;
20 	),
21 	TP_printk("fsi-acf%d command %08x",
22 		  __entry->master_idx, __entry->op
23 	)
24 );
25 
26 TRACE_EVENT(fsi_master_acf_send_request,
27 	TP_PROTO(const struct fsi_master_acf *master, const struct fsi_msg *cmd, u8 rbits),
28 	TP_ARGS(master, cmd, rbits),
29 	TP_STRUCT__entry(
30 		__field(int,		master_idx)
31 		__field(uint64_t,	msg)
32 		__field(u8,		bits)
33 		__field(u8,		rbits)
34 	),
35 	TP_fast_assign(
36 		__entry->master_idx = master->master.idx;
37 		__entry->msg = cmd->msg;
38 		__entry->bits = cmd->bits;
39 		__entry->rbits = rbits;
40 	),
41 	TP_printk("fsi-acf%d cmd: %016llx/%d/%d",
42 		__entry->master_idx, (unsigned long long)__entry->msg,
43 		__entry->bits, __entry->rbits
44 	)
45 );
46 
47 TRACE_EVENT(fsi_master_acf_copro_response,
48 	TP_PROTO(const struct fsi_master_acf *master, u8 rtag, u8 rcrc, __be32 rdata, bool crc_ok),
49 	TP_ARGS(master, rtag, rcrc, rdata, crc_ok),
50 	TP_STRUCT__entry(
51 		__field(int,	master_idx)
52 		__field(u8,	rtag)
53 		__field(u8,	rcrc)
54 		__field(u32,    rdata)
55 		__field(bool,   crc_ok)
56 	),
57 	TP_fast_assign(
58 		__entry->master_idx = master->master.idx;
59 		__entry->rtag = rtag;
60 		__entry->rcrc = rcrc;
61 		__entry->rdata = be32_to_cpu(rdata);
62 		__entry->crc_ok = crc_ok;
63 	),
64 	TP_printk("fsi-acf%d rsp: tag=%04x crc=%04x data=%08x %c\n",
65 		__entry->master_idx, __entry->rtag, __entry->rcrc,
66 		__entry->rdata, __entry->crc_ok ? ' ' : '!'
67 	)
68 );
69 
70 TRACE_EVENT(fsi_master_acf_crc_rsp_error,
71 	TP_PROTO(const struct fsi_master_acf *master, int retries),
72 	TP_ARGS(master, retries),
73 	TP_STRUCT__entry(
74 		__field(int,	master_idx)
75 		__field(int,	retries)
76 	),
77 	TP_fast_assign(
78 		__entry->master_idx = master->master.idx;
79 		__entry->retries = retries;
80 	),
81 	TP_printk("fsi-acf%d CRC error in response retry %d",
82 		__entry->master_idx, __entry->retries
83 	)
84 );
85 
86 TRACE_EVENT(fsi_master_acf_poll_response_busy,
87 	TP_PROTO(const struct fsi_master_acf *master, int busy_count),
88 	TP_ARGS(master, busy_count),
89 	TP_STRUCT__entry(
90 		__field(int,	master_idx)
91 		__field(int,	busy_count)
92 	),
93 	TP_fast_assign(
94 		__entry->master_idx = master->master.idx;
95 		__entry->busy_count = busy_count;
96 	),
97 	TP_printk("fsi-acf%d: device reported busy %d times",
98 		__entry->master_idx, __entry->busy_count
99 	)
100 );
101 
102 TRACE_EVENT(fsi_master_acf_cmd_abs_addr,
103 	TP_PROTO(const struct fsi_master_acf *master, u32 addr),
104 	TP_ARGS(master, addr),
105 	TP_STRUCT__entry(
106 		__field(int,	master_idx)
107 		__field(u32,	addr)
108 	),
109 	TP_fast_assign(
110 		__entry->master_idx = master->master.idx;
111 		__entry->addr = addr;
112 	),
113 	TP_printk("fsi-acf%d: Sending ABS_ADR %06x",
114 		__entry->master_idx, __entry->addr
115 	)
116 );
117 
118 TRACE_EVENT(fsi_master_acf_cmd_rel_addr,
119 	TP_PROTO(const struct fsi_master_acf *master, u32 rel_addr),
120 	TP_ARGS(master, rel_addr),
121 	TP_STRUCT__entry(
122 		__field(int,	master_idx)
123 		__field(u32,	rel_addr)
124 	),
125 	TP_fast_assign(
126 		__entry->master_idx = master->master.idx;
127 		__entry->rel_addr = rel_addr;
128 	),
129 	TP_printk("fsi-acf%d: Sending REL_ADR %03x",
130 		__entry->master_idx, __entry->rel_addr
131 	)
132 );
133 
134 TRACE_EVENT(fsi_master_acf_cmd_same_addr,
135 	TP_PROTO(const struct fsi_master_acf *master),
136 	TP_ARGS(master),
137 	TP_STRUCT__entry(
138 		__field(int,	master_idx)
139 	),
140 	TP_fast_assign(
141 		__entry->master_idx = master->master.idx;
142 	),
143 	TP_printk("fsi-acf%d: Sending SAME_ADR",
144 		__entry->master_idx
145 	)
146 );
147 
148 #endif /* _TRACE_FSI_MASTER_ACF_H */
149 
150 #include <trace/define_trace.h>
151