xref: /openbmc/linux/drivers/soc/qcom/trace-rpmh.h (revision e8254a8e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4  */
5 
6 #if !defined(_TRACE_RPMH_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_RPMH_H
8 
9 #undef TRACE_SYSTEM
10 #define TRACE_SYSTEM rpmh
11 
12 #include <linux/tracepoint.h>
13 #include "rpmh-internal.h"
14 
15 TRACE_EVENT(rpmh_tx_done,
16 
17 	TP_PROTO(struct rsc_drv *d, int m, const struct tcs_request *r),
18 
19 	TP_ARGS(d, m, r),
20 
21 	TP_STRUCT__entry(
22 			 __string(name, d->name)
23 			 __field(int, m)
24 			 __field(u32, addr)
25 			 __field(u32, data)
26 	),
27 
28 	TP_fast_assign(
29 		       __assign_str(name, d->name);
30 		       __entry->m = m;
31 		       __entry->addr = r->cmds[0].addr;
32 		       __entry->data = r->cmds[0].data;
33 	),
34 
35 	TP_printk("%s: ack: tcs-m: %d addr: %#x data: %#x",
36 		  __get_str(name), __entry->m, __entry->addr, __entry->data)
37 );
38 
39 TRACE_EVENT(rpmh_send_msg,
40 
41 	TP_PROTO(struct rsc_drv *d, int m, int n, u32 h,
42 		 const struct tcs_cmd *c),
43 
44 	TP_ARGS(d, m, n, h, c),
45 
46 	TP_STRUCT__entry(
47 			 __string(name, d->name)
48 			 __field(int, m)
49 			 __field(int, n)
50 			 __field(u32, hdr)
51 			 __field(u32, addr)
52 			 __field(u32, data)
53 			 __field(bool, wait)
54 	),
55 
56 	TP_fast_assign(
57 		       __assign_str(name, d->name);
58 		       __entry->m = m;
59 		       __entry->n = n;
60 		       __entry->hdr = h;
61 		       __entry->addr = c->addr;
62 		       __entry->data = c->data;
63 		       __entry->wait = c->wait;
64 	),
65 
66 	TP_printk("%s: send-msg: tcs(m): %d cmd(n): %d msgid: %#x addr: %#x data: %#x complete: %d",
67 		  __get_str(name), __entry->m, __entry->n, __entry->hdr,
68 		  __entry->addr, __entry->data, __entry->wait)
69 );
70 
71 #endif /* _TRACE_RPMH_H */
72 
73 #undef TRACE_INCLUDE_PATH
74 #define TRACE_INCLUDE_PATH .
75 
76 #undef TRACE_INCLUDE_FILE
77 #define TRACE_INCLUDE_FILE trace-rpmh
78 
79 #include <trace/define_trace.h>
80