1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Trace events in pm8001 driver.
4 *
5 * Copyright 2020 Google LLC
6 * Author: Akshat Jain <akshatzen@google.com>
7 */
8
9#undef TRACE_SYSTEM
10#define TRACE_SYSTEM pm80xx
11
12#if !defined(_TRACE_PM80XX_H) || defined(TRACE_HEADER_MULTI_READ)
13#define _TRACE_PM80XX_H
14
15#include <linux/tracepoint.h>
16#include "pm8001_sas.h"
17
18TRACE_EVENT(pm80xx_request_issue,
19 TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
20 u16 ata_opcode, int running_req),
21
22 TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
23
24 TP_STRUCT__entry(
25 __field(u32, id)
26 __field(u32, phy_id)
27 __field(u32, htag)
28 __field(u32, ctlr_opcode)
29 __field(u16, ata_opcode)
30 __field(int, running_req)
31 ),
32
33 TP_fast_assign(
34 __entry->id = id;
35 __entry->phy_id = phy_id;
36 __entry->htag = htag;
37 __entry->ctlr_opcode = ctlr_opcode;
38 __entry->ata_opcode = ata_opcode;
39 __entry->running_req = running_req;
40 ),
41
42 TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
43 __entry->id, __entry->phy_id, __entry->htag,
44 __entry->ctlr_opcode, __entry->ata_opcode,
45 __entry->running_req)
46);
47
48TRACE_EVENT(pm80xx_request_complete,
49 TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
50 u16 ata_opcode, int running_req),
51
52 TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
53
54 TP_STRUCT__entry(
55 __field(u32, id)
56 __field(u32, phy_id)
57 __field(u32, htag)
58 __field(u32, ctlr_opcode)
59 __field(u16, ata_opcode)
60 __field(int, running_req)
61 ),
62
63 TP_fast_assign(
64 __entry->id = id;
65 __entry->phy_id = phy_id;
66 __entry->htag = htag;
67 __entry->ctlr_opcode = ctlr_opcode;
68 __entry->ata_opcode = ata_opcode;
69 __entry->running_req = running_req;
70 ),
71
72 TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
73 __entry->id, __entry->phy_id, __entry->htag,
74 __entry->ctlr_opcode, __entry->ata_opcode,
75 __entry->running_req)
76);
77
78TRACE_EVENT(pm80xx_mpi_build_cmd,
79 TP_PROTO(u32 id, u32 opc, u32 htag, u32 qi, u32 pi, u32 ci),
80
81 TP_ARGS(id, opc, htag, qi, pi, ci),
82
83 TP_STRUCT__entry(
84 __field(u32, id)
85 __field(u32, opc)
86 __field(u32, htag)
87 __field(u32, qi)
88 __field(u32, pi)
89 __field(u32, ci)
90 ),
91
92 TP_fast_assign(
93 __entry->id = id;
94 __entry->opc = opc;
95 __entry->htag = htag;
96 __entry->qi = qi;
97 __entry->pi = pi;
98 __entry->ci = ci;
99 ),
100
101 TP_printk("ctlr_id = %u opc = %#x htag = %#x QI = %u PI = %u CI = %u",
102 __entry->id, __entry->opc, __entry->htag, __entry->qi,
103 __entry->pi, __entry->ci)
104);
105
106#endif /* _TRACE_PM80XX_H_ */
107
108#undef TRACE_INCLUDE_PATH
109#undef TRACE_INCLUDE_FILE
110#define TRACE_INCLUDE_PATH .
111#define TRACE_INCLUDE_FILE pm80xx_tracepoints
112
113#include <trace/define_trace.h>
114

source code of linux/drivers/scsi/pm8001/pm80xx_tracepoints.h