xref: /openbmc/linux/include/trace/events/scmi.h (revision 3a35093a)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM scmi
4 
5 #if !defined(_TRACE_SCMI_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_SCMI_H
7 
8 #include <linux/tracepoint.h>
9 
10 TRACE_EVENT(scmi_xfer_begin,
11 	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
12 		 bool poll),
13 	TP_ARGS(transfer_id, msg_id, protocol_id, seq, poll),
14 
15 	TP_STRUCT__entry(
16 		__field(int, transfer_id)
17 		__field(u8, msg_id)
18 		__field(u8, protocol_id)
19 		__field(u16, seq)
20 		__field(bool, poll)
21 	),
22 
23 	TP_fast_assign(
24 		__entry->transfer_id = transfer_id;
25 		__entry->msg_id = msg_id;
26 		__entry->protocol_id = protocol_id;
27 		__entry->seq = seq;
28 		__entry->poll = poll;
29 	),
30 
31 	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u poll=%u",
32 		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
33 		__entry->seq, __entry->poll)
34 );
35 
36 TRACE_EVENT(scmi_xfer_end,
37 	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
38 		 int status),
39 	TP_ARGS(transfer_id, msg_id, protocol_id, seq, status),
40 
41 	TP_STRUCT__entry(
42 		__field(int, transfer_id)
43 		__field(u8, msg_id)
44 		__field(u8, protocol_id)
45 		__field(u16, seq)
46 		__field(int, status)
47 	),
48 
49 	TP_fast_assign(
50 		__entry->transfer_id = transfer_id;
51 		__entry->msg_id = msg_id;
52 		__entry->protocol_id = protocol_id;
53 		__entry->seq = seq;
54 		__entry->status = status;
55 	),
56 
57 	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u status=%d",
58 		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
59 		__entry->seq, __entry->status)
60 );
61 
62 TRACE_EVENT(scmi_rx_done,
63 	TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
64 		 u8 msg_type),
65 	TP_ARGS(transfer_id, msg_id, protocol_id, seq, msg_type),
66 
67 	TP_STRUCT__entry(
68 		__field(int, transfer_id)
69 		__field(u8, msg_id)
70 		__field(u8, protocol_id)
71 		__field(u16, seq)
72 		__field(u8, msg_type)
73 	),
74 
75 	TP_fast_assign(
76 		__entry->transfer_id = transfer_id;
77 		__entry->msg_id = msg_id;
78 		__entry->protocol_id = protocol_id;
79 		__entry->seq = seq;
80 		__entry->msg_type = msg_type;
81 	),
82 
83 	TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u msg_type=%u",
84 		__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
85 		__entry->seq, __entry->msg_type)
86 );
87 #endif /* _TRACE_SCMI_H */
88 
89 /* This part must be outside protection */
90 #include <trace/define_trace.h>
91