1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /******************************************************************************
4 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
5 * Copyright(c) 2016-2017 Intel Deutschland GmbH
6 *****************************************************************************/
8 #if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
9 #define __IWLWIFI_DEVICE_TRACE_IO
11 #include <linux/tracepoint.h>
12 #include <linux/pci.h>
15 #define TRACE_SYSTEM iwlwifi_io
17 TRACE_EVENT(iwlwifi_dev_ioread32,
18 TP_PROTO(const struct device *dev, u32 offs, u32 val),
19 TP_ARGS(dev, offs, val),
30 TP_printk("[%s] read io[%#x] = %#x",
31 __get_str(dev), __entry->offs, __entry->val)
34 TRACE_EVENT(iwlwifi_dev_iowrite8,
35 TP_PROTO(const struct device *dev, u32 offs, u8 val),
36 TP_ARGS(dev, offs, val),
47 TP_printk("[%s] write io[%#x] = %#x)",
48 __get_str(dev), __entry->offs, __entry->val)
51 TRACE_EVENT(iwlwifi_dev_iowrite32,
52 TP_PROTO(const struct device *dev, u32 offs, u32 val),
53 TP_ARGS(dev, offs, val),
64 TP_printk("[%s] write io[%#x] = %#x)",
65 __get_str(dev), __entry->offs, __entry->val)
68 TRACE_EVENT(iwlwifi_dev_iowrite64,
69 TP_PROTO(const struct device *dev, u64 offs, u64 val),
70 TP_ARGS(dev, offs, val),
81 TP_printk("[%s] write io[%llu] = %llu)",
82 __get_str(dev), __entry->offs, __entry->val)
85 TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
86 TP_PROTO(const struct device *dev, u32 offs, u32 val),
87 TP_ARGS(dev, offs, val),
98 TP_printk("[%s] write PRPH[%#x] = %#x)",
99 __get_str(dev), __entry->offs, __entry->val)
102 TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
103 TP_PROTO(const struct device *dev, u64 offs, u64 val),
104 TP_ARGS(dev, offs, val),
112 __entry->offs = offs;
115 TP_printk("[%s] write PRPH[%llu] = %llu)",
116 __get_str(dev), __entry->offs, __entry->val)
119 TRACE_EVENT(iwlwifi_dev_ioread_prph32,
120 TP_PROTO(const struct device *dev, u32 offs, u32 val),
121 TP_ARGS(dev, offs, val),
129 __entry->offs = offs;
132 TP_printk("[%s] read PRPH[%#x] = %#x",
133 __get_str(dev), __entry->offs, __entry->val)
136 TRACE_EVENT(iwlwifi_dev_irq,
137 TP_PROTO(const struct device *dev),
145 /* TP_printk("") doesn't compile */
149 TRACE_EVENT(iwlwifi_dev_irq_msix,
150 TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
151 bool defirq, u32 inta_fh, u32 inta_hw),
152 TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
157 __field(u32, inta_fh)
158 __field(u32, inta_hw)
162 __entry->entry = msix_entry->entry;
163 __entry->defirq = defirq;
164 __entry->inta_fh = inta_fh;
165 __entry->inta_hw = inta_hw;
167 TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
168 __entry->entry, __entry->defirq,
169 __entry->inta_fh, __entry->inta_hw)
172 TRACE_EVENT(iwlwifi_dev_ict_read,
173 TP_PROTO(const struct device *dev, u32 index, u32 value),
174 TP_ARGS(dev, index, value),
182 __entry->index = index;
183 __entry->value = value;
185 TP_printk("[%s] read ict[%d] = %#.8x",
186 __get_str(dev), __entry->index, __entry->value)
188 #endif /* __IWLWIFI_DEVICE_TRACE_IO */
190 #undef TRACE_INCLUDE_PATH
191 #define TRACE_INCLUDE_PATH .
192 #undef TRACE_INCLUDE_FILE
193 #define TRACE_INCLUDE_FILE iwl-devtrace-io
194 #include <trace/define_trace.h>