1 /******************************************************************************
3 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
4 * Copyright(c) 2016 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>
34 #define TRACE_SYSTEM iwlwifi_io
36 TRACE_EVENT(iwlwifi_dev_ioread32,
37 TP_PROTO(const struct device *dev, u32 offs, u32 val),
38 TP_ARGS(dev, offs, val),
49 TP_printk("[%s] read io[%#x] = %#x",
50 __get_str(dev), __entry->offs, __entry->val)
53 TRACE_EVENT(iwlwifi_dev_iowrite8,
54 TP_PROTO(const struct device *dev, u32 offs, u8 val),
55 TP_ARGS(dev, offs, val),
66 TP_printk("[%s] write io[%#x] = %#x)",
67 __get_str(dev), __entry->offs, __entry->val)
70 TRACE_EVENT(iwlwifi_dev_iowrite32,
71 TP_PROTO(const struct device *dev, u32 offs, u32 val),
72 TP_ARGS(dev, offs, val),
83 TP_printk("[%s] write io[%#x] = %#x)",
84 __get_str(dev), __entry->offs, __entry->val)
87 TRACE_EVENT(iwlwifi_dev_iowrite64,
88 TP_PROTO(const struct device *dev, u64 offs, u64 val),
89 TP_ARGS(dev, offs, val),
100 TP_printk("[%s] write io[%llu] = %llu)",
101 __get_str(dev), __entry->offs, __entry->val)
104 TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
105 TP_PROTO(const struct device *dev, u32 offs, u32 val),
106 TP_ARGS(dev, offs, val),
114 __entry->offs = offs;
117 TP_printk("[%s] write PRPH[%#x] = %#x)",
118 __get_str(dev), __entry->offs, __entry->val)
121 TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
122 TP_PROTO(const struct device *dev, u64 offs, u64 val),
123 TP_ARGS(dev, offs, val),
131 __entry->offs = offs;
134 TP_printk("[%s] write PRPH[%llu] = %llu)",
135 __get_str(dev), __entry->offs, __entry->val)
138 TRACE_EVENT(iwlwifi_dev_ioread_prph32,
139 TP_PROTO(const struct device *dev, u32 offs, u32 val),
140 TP_ARGS(dev, offs, val),
148 __entry->offs = offs;
151 TP_printk("[%s] read PRPH[%#x] = %#x",
152 __get_str(dev), __entry->offs, __entry->val)
155 TRACE_EVENT(iwlwifi_dev_irq,
156 TP_PROTO(const struct device *dev),
164 /* TP_printk("") doesn't compile */
168 TRACE_EVENT(iwlwifi_dev_ict_read,
169 TP_PROTO(const struct device *dev, u32 index, u32 value),
170 TP_ARGS(dev, index, value),
178 __entry->index = index;
179 __entry->value = value;
181 TP_printk("[%s] read ict[%d] = %#.8x",
182 __get_str(dev), __entry->index, __entry->value)
184 #endif /* __IWLWIFI_DEVICE_TRACE_IO */
186 #undef TRACE_INCLUDE_PATH
187 #define TRACE_INCLUDE_PATH .
188 #undef TRACE_INCLUDE_FILE
189 #define TRACE_INCLUDE_FILE iwl-devtrace-io
190 #include <trace/define_trace.h>