1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Trace events in pm8001 driver.
5 * Copyright 2020 Google LLC
6 * Author: Akshat Jain <akshatzen@google.com>
10 #define TRACE_SYSTEM pm80xx
12 #if !defined(_TRACE_PM80XX_H) || defined(TRACE_HEADER_MULTI_READ)
13 #define _TRACE_PM80XX_H
15 #include <linux/tracepoint.h>
16 #include "pm8001_sas.h"
18 TRACE_EVENT(pm80xx_request_issue
,
19 TP_PROTO(u32 id
, u32 phy_id
, u32 htag
, u32 ctlr_opcode
,
20 u16 ata_opcode
, int running_req
),
22 TP_ARGS(id
, phy_id
, htag
, ctlr_opcode
, ata_opcode
, running_req
),
28 __field(u32
, ctlr_opcode
)
29 __field(u16
, ata_opcode
)
30 __field(int, running_req
)
35 __entry
->phy_id
= phy_id
;
37 __entry
->ctlr_opcode
= ctlr_opcode
;
38 __entry
->ata_opcode
= ata_opcode
;
39 __entry
->running_req
= running_req
;
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
,
48 TRACE_EVENT(pm80xx_request_complete
,
49 TP_PROTO(u32 id
, u32 phy_id
, u32 htag
, u32 ctlr_opcode
,
50 u16 ata_opcode
, int running_req
),
52 TP_ARGS(id
, phy_id
, htag
, ctlr_opcode
, ata_opcode
, running_req
),
58 __field(u32
, ctlr_opcode
)
59 __field(u16
, ata_opcode
)
60 __field(int, running_req
)
65 __entry
->phy_id
= phy_id
;
67 __entry
->ctlr_opcode
= ctlr_opcode
;
68 __entry
->ata_opcode
= ata_opcode
;
69 __entry
->running_req
= running_req
;
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
,
78 TRACE_EVENT(pm80xx_mpi_build_cmd
,
79 TP_PROTO(u32 id
, u32 opc
, u32 htag
, u32 qi
, u32 pi
, u32 ci
),
81 TP_ARGS(id
, opc
, htag
, qi
, pi
, ci
),
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
)
106 #endif /* _TRACE_PM80XX_H_ */
108 #undef TRACE_INCLUDE_PATH
109 #undef TRACE_INCLUDE_FILE
110 #define TRACE_INCLUDE_PATH .
111 #define TRACE_INCLUDE_FILE pm80xx_tracepoints
113 #include <trace/define_trace.h>