Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
[deliverable/linux.git] / drivers / net / wireless / intel / iwlwifi / iwl-devtrace-io.h
1 /******************************************************************************
2 *
3 * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
20 *
21 * Contact Information:
22 * Intel Linux Wireless <linuxwifi@intel.com>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 *****************************************************************************/
26
27 #if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
28 #define __IWLWIFI_DEVICE_TRACE_IO
29
30 #include <linux/tracepoint.h>
31
32 #undef TRACE_SYSTEM
33 #define TRACE_SYSTEM iwlwifi_io
34
35 TRACE_EVENT(iwlwifi_dev_ioread32,
36 TP_PROTO(const struct device *dev, u32 offs, u32 val),
37 TP_ARGS(dev, offs, val),
38 TP_STRUCT__entry(
39 DEV_ENTRY
40 __field(u32, offs)
41 __field(u32, val)
42 ),
43 TP_fast_assign(
44 DEV_ASSIGN;
45 __entry->offs = offs;
46 __entry->val = val;
47 ),
48 TP_printk("[%s] read io[%#x] = %#x",
49 __get_str(dev), __entry->offs, __entry->val)
50 );
51
52 TRACE_EVENT(iwlwifi_dev_iowrite8,
53 TP_PROTO(const struct device *dev, u32 offs, u8 val),
54 TP_ARGS(dev, offs, val),
55 TP_STRUCT__entry(
56 DEV_ENTRY
57 __field(u32, offs)
58 __field(u8, val)
59 ),
60 TP_fast_assign(
61 DEV_ASSIGN;
62 __entry->offs = offs;
63 __entry->val = val;
64 ),
65 TP_printk("[%s] write io[%#x] = %#x)",
66 __get_str(dev), __entry->offs, __entry->val)
67 );
68
69 TRACE_EVENT(iwlwifi_dev_iowrite32,
70 TP_PROTO(const struct device *dev, u32 offs, u32 val),
71 TP_ARGS(dev, offs, val),
72 TP_STRUCT__entry(
73 DEV_ENTRY
74 __field(u32, offs)
75 __field(u32, val)
76 ),
77 TP_fast_assign(
78 DEV_ASSIGN;
79 __entry->offs = offs;
80 __entry->val = val;
81 ),
82 TP_printk("[%s] write io[%#x] = %#x)",
83 __get_str(dev), __entry->offs, __entry->val)
84 );
85
86 TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
87 TP_PROTO(const struct device *dev, u32 offs, u32 val),
88 TP_ARGS(dev, offs, val),
89 TP_STRUCT__entry(
90 DEV_ENTRY
91 __field(u32, offs)
92 __field(u32, val)
93 ),
94 TP_fast_assign(
95 DEV_ASSIGN;
96 __entry->offs = offs;
97 __entry->val = val;
98 ),
99 TP_printk("[%s] write PRPH[%#x] = %#x)",
100 __get_str(dev), __entry->offs, __entry->val)
101 );
102
103 TRACE_EVENT(iwlwifi_dev_ioread_prph32,
104 TP_PROTO(const struct device *dev, u32 offs, u32 val),
105 TP_ARGS(dev, offs, val),
106 TP_STRUCT__entry(
107 DEV_ENTRY
108 __field(u32, offs)
109 __field(u32, val)
110 ),
111 TP_fast_assign(
112 DEV_ASSIGN;
113 __entry->offs = offs;
114 __entry->val = val;
115 ),
116 TP_printk("[%s] read PRPH[%#x] = %#x",
117 __get_str(dev), __entry->offs, __entry->val)
118 );
119
120 TRACE_EVENT(iwlwifi_dev_irq,
121 TP_PROTO(const struct device *dev),
122 TP_ARGS(dev),
123 TP_STRUCT__entry(
124 DEV_ENTRY
125 ),
126 TP_fast_assign(
127 DEV_ASSIGN;
128 ),
129 /* TP_printk("") doesn't compile */
130 TP_printk("%d", 0)
131 );
132
133 TRACE_EVENT(iwlwifi_dev_ict_read,
134 TP_PROTO(const struct device *dev, u32 index, u32 value),
135 TP_ARGS(dev, index, value),
136 TP_STRUCT__entry(
137 DEV_ENTRY
138 __field(u32, index)
139 __field(u32, value)
140 ),
141 TP_fast_assign(
142 DEV_ASSIGN;
143 __entry->index = index;
144 __entry->value = value;
145 ),
146 TP_printk("[%s] read ict[%d] = %#.8x",
147 __get_str(dev), __entry->index, __entry->value)
148 );
149 #endif /* __IWLWIFI_DEVICE_TRACE_IO */
150
151 #undef TRACE_INCLUDE_PATH
152 #define TRACE_INCLUDE_PATH .
153 #undef TRACE_INCLUDE_FILE
154 #define TRACE_INCLUDE_FILE iwl-devtrace-io
155 #include <trace/define_trace.h>
This page took 0.050928 seconds and 5 git commands to generate.