aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2009-11-20 15:04:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-23 17:05:30 -0500
commit4e03185fb8e85d5624d3a68feced70cc9c9e2136 (patch)
treeb0dba38c77f74b7ea43b468e9a28c10044df6e84 /drivers/net/wireless/iwlwifi
parent3305443c968b98902199bea0abbd9443c6a2bb8d (diff)
iwlwifi: Add iwl_write8()
To support byte writes to CSR_INT_COALESCING and CSR_INT_PERIODIC registers, add iwl_write8(), including debug/trace support. Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-devtrace.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-devtrace.h16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h20
3 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
index 4ef5acaa556d..e7d88d1da15d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.c
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c
@@ -5,6 +5,7 @@
5#define CREATE_TRACE_POINTS 5#define CREATE_TRACE_POINTS
6#include "iwl-devtrace.h" 6#include "iwl-devtrace.h"
7 7
8EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_iowrite8);
8EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ioread32); 9EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ioread32);
9EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_iowrite32); 10EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_iowrite32);
10EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_rx); 11EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_rx);
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
index 8c7159208da1..f2d4b01ba466 100644
--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h
+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
@@ -32,6 +32,22 @@ TRACE_EVENT(iwlwifi_dev_ioread32,
32 TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val) 32 TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val)
33); 33);
34 34
35TRACE_EVENT(iwlwifi_dev_iowrite8,
36 TP_PROTO(struct iwl_priv *priv, u32 offs, u8 val),
37 TP_ARGS(priv, offs, val),
38 TP_STRUCT__entry(
39 PRIV_ENTRY
40 __field(u32, offs)
41 __field(u8, val)
42 ),
43 TP_fast_assign(
44 PRIV_ASSIGN;
45 __entry->offs = offs;
46 __entry->val = val;
47 ),
48 TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val)
49);
50
35TRACE_EVENT(iwlwifi_dev_iowrite32, 51TRACE_EVENT(iwlwifi_dev_iowrite32,
36 TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val), 52 TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
37 TP_ARGS(priv, offs, val), 53 TP_ARGS(priv, offs, val),
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index d0a358c9d96b..e552d4c4bdbe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -62,6 +62,26 @@
62 * 62 *
63 */ 63 */
64 64
65static inline void _iwl_write8(struct iwl_priv *priv, u32 ofs, u8 val)
66{
67 trace_iwlwifi_dev_iowrite8(priv, ofs, val);
68 iowrite8(val, priv->hw_base + ofs);
69}
70
71#ifdef CONFIG_IWLWIFI_DEBUG
72static inline void __iwl_write8(const char *f, u32 l, struct iwl_priv *priv,
73 u32 ofs, u8 val)
74{
75 IWL_DEBUG_IO(priv, "write8(0x%08X, 0x%02X) - %s %d\n", ofs, val, f, l);
76 _iwl_write8(priv, ofs, val);
77}
78#define iwl_write8(priv, ofs, val) \
79 __iwl_write8(__FILE__, __LINE__, priv, ofs, val)
80#else
81#define iwl_write8(priv, ofs, val) _iwl_write8(priv, ofs, val)
82#endif
83
84
65static inline void _iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val) 85static inline void _iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val)
66{ 86{
67 trace_iwlwifi_dev_iowrite32(priv, ofs, val); 87 trace_iwlwifi_dev_iowrite32(priv, ofs, val);