1 /******************************************************************************
3 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
4 * Copyright(c) 2016-2017 Intel Deutschland GmbH
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 * The full GNU General Public License is included in this distribution in the
20 * file called LICENSE.
22 * Contact Information:
23 * Intel Linux Wireless <linuxwifi@intel.com>
24 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
26 *****************************************************************************/
28 #if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
29 #define __IWLWIFI_DEVICE_TRACE_IO
31 #include <linux/tracepoint.h>
32 #include <linux/pci.h>
35 #define TRACE_SYSTEM iwlwifi_io
37 TRACE_EVENT(iwlwifi_dev_ioread32,
38 TP_PROTO(const struct device *dev, u32 offs, u32 val),
39 TP_ARGS(dev, offs, val),
50 TP_printk("[%s] read io[%#x] = %#x",
51 __get_str(dev), __entry->offs, __entry->val)
54 TRACE_EVENT(iwlwifi_dev_iowrite8,
55 TP_PROTO(const struct device *dev, u32 offs, u8 val),
56 TP_ARGS(dev, offs, val),
67 TP_printk("[%s] write io[%#x] = %#x)",
68 __get_str(dev), __entry->offs, __entry->val)
71 TRACE_EVENT(iwlwifi_dev_iowrite32,
72 TP_PROTO(const struct device *dev, u32 offs, u32 val),
73 TP_ARGS(dev, offs, val),
84 TP_printk("[%s] write io[%#x] = %#x)",
85 __get_str(dev), __entry->offs, __entry->val)
88 TRACE_EVENT(iwlwifi_dev_iowrite64,
89 TP_PROTO(const struct device *dev, u64 offs, u64 val),
90 TP_ARGS(dev, offs, val),
101 TP_printk("[%s] write io[%llu] = %llu)",
102 __get_str(dev), __entry->offs, __entry->val)
105 TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
106 TP_PROTO(const struct device *dev, u32 offs, u32 val),
107 TP_ARGS(dev, offs, val),
115 __entry->offs = offs;
118 TP_printk("[%s] write PRPH[%#x] = %#x)",
119 __get_str(dev), __entry->offs, __entry->val)
122 TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
123 TP_PROTO(const struct device *dev, u64 offs, u64 val),
124 TP_ARGS(dev, offs, val),
132 __entry->offs = offs;
135 TP_printk("[%s] write PRPH[%llu] = %llu)",
136 __get_str(dev), __entry->offs, __entry->val)
139 TRACE_EVENT(iwlwifi_dev_ioread_prph32,
140 TP_PROTO(const struct device *dev, u32 offs, u32 val),
141 TP_ARGS(dev, offs, val),
149 __entry->offs = offs;
152 TP_printk("[%s] read PRPH[%#x] = %#x",
153 __get_str(dev), __entry->offs, __entry->val)
156 TRACE_EVENT(iwlwifi_dev_irq,
157 TP_PROTO(const struct device *dev),
165 /* TP_printk("") doesn't compile */
169 TRACE_EVENT(iwlwifi_dev_irq_msix,
170 TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
171 bool defirq, u32 inta_fh, u32 inta_hw),
172 TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
177 __field(u32, inta_fh)
178 __field(u32, inta_hw)
182 __entry->entry = msix_entry->entry;
183 __entry->defirq = defirq;
184 __entry->inta_fh = inta_fh;
185 __entry->inta_hw = inta_hw;
187 TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
188 __entry->entry, __entry->defirq,
189 __entry->inta_fh, __entry->inta_hw)
192 TRACE_EVENT(iwlwifi_dev_ict_read,
193 TP_PROTO(const struct device *dev, u32 index, u32 value),
194 TP_ARGS(dev, index, value),
202 __entry->index = index;
203 __entry->value = value;
205 TP_printk("[%s] read ict[%d] = %#.8x",
206 __get_str(dev), __entry->index, __entry->value)
208 #endif /* __IWLWIFI_DEVICE_TRACE_IO */
210 #undef TRACE_INCLUDE_PATH
211 #define TRACE_INCLUDE_PATH .
212 #undef TRACE_INCLUDE_FILE
213 #define TRACE_INCLUDE_FILE iwl-devtrace-io
214 #include <trace/define_trace.h>