aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-io.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:11:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:30:29 -0400
commit83ed90155f98bd949735c2cc22d832b557a6d7d1 (patch)
tree795ecd1ebd93357a80895825310c19315a633e49 /drivers/net/wireless/iwlwifi/iwl-io.h
parenta72b8b088c3465b28192c1a14ba97be8223a8cec (diff)
iwlagn: all function iwl-io.c receive iwl_bus
Which means that iwl-io.c doesn't need to include iwl-dev.h any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-io.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h61
1 files changed, 29 insertions, 32 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index 19a093101122..ced2cbeb6eae 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -29,65 +29,62 @@
29#ifndef __iwl_io_h__ 29#ifndef __iwl_io_h__
30#define __iwl_io_h__ 30#define __iwl_io_h__
31 31
32#include <linux/io.h>
33
34#include "iwl-dev.h"
35#include "iwl-debug.h"
36#include "iwl-devtrace.h" 32#include "iwl-devtrace.h"
33#include "iwl-shared.h"
37#include "iwl-bus.h" 34#include "iwl-bus.h"
38 35
39static inline void iwl_write8(struct iwl_priv *priv, u32 ofs, u8 val) 36static inline void iwl_write8(struct iwl_bus *bus, u32 ofs, u8 val)
40{ 37{
41 trace_iwlwifi_dev_iowrite8(priv, ofs, val); 38 trace_iwlwifi_dev_iowrite8(priv(bus), ofs, val);
42 bus_write8(priv->bus, ofs, val); 39 bus_write8(bus, ofs, val);
43} 40}
44 41
45static inline void iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val) 42static inline void iwl_write32(struct iwl_bus *bus, u32 ofs, u32 val)
46{ 43{
47 trace_iwlwifi_dev_iowrite32(priv, ofs, val); 44 trace_iwlwifi_dev_iowrite32(priv(bus), ofs, val);
48 bus_write32(priv->bus, ofs, val); 45 bus_write32(bus, ofs, val);
49} 46}
50 47
51static inline u32 iwl_read32(struct iwl_priv *priv, u32 ofs) 48static inline u32 iwl_read32(struct iwl_bus *bus, u32 ofs)
52{ 49{
53 u32 val = bus_read32(priv->bus, ofs); 50 u32 val = bus_read32(bus, ofs);
54 trace_iwlwifi_dev_ioread32(priv, ofs, val); 51 trace_iwlwifi_dev_ioread32(priv(bus), ofs, val);
55 return val; 52 return val;
56} 53}
57 54
58void iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask); 55void iwl_set_bit(struct iwl_bus *bus, u32 reg, u32 mask);
59void iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask); 56void iwl_clear_bit(struct iwl_bus *bus, u32 reg, u32 mask);
60 57
61int iwl_poll_bit(struct iwl_priv *priv, u32 addr, 58int iwl_poll_bit(struct iwl_bus *bus, u32 addr,
62 u32 bits, u32 mask, int timeout); 59 u32 bits, u32 mask, int timeout);
63int iwl_poll_direct_bit(struct iwl_priv *priv, u32 addr, u32 mask, 60int iwl_poll_direct_bit(struct iwl_bus *bus, u32 addr, u32 mask,
64 int timeout); 61 int timeout);
65 62
66int iwl_grab_nic_access_silent(struct iwl_priv *priv); 63int iwl_grab_nic_access_silent(struct iwl_bus *bus);
67int iwl_grab_nic_access(struct iwl_priv *priv); 64int iwl_grab_nic_access(struct iwl_bus *bus);
68void iwl_release_nic_access(struct iwl_priv *priv); 65void iwl_release_nic_access(struct iwl_bus *bus);
69 66
70u32 iwl_read_direct32(struct iwl_priv *priv, u32 reg); 67u32 iwl_read_direct32(struct iwl_bus *bus, u32 reg);
71void iwl_write_direct32(struct iwl_priv *priv, u32 reg, u32 value); 68void iwl_write_direct32(struct iwl_bus *bus, u32 reg, u32 value);
72 69
73 70
74u32 iwl_read_prph(struct iwl_priv *priv, u32 reg); 71u32 iwl_read_prph(struct iwl_bus *bus, u32 reg);
75void iwl_write_prph(struct iwl_priv *priv, u32 addr, u32 val); 72void iwl_write_prph(struct iwl_bus *bus, u32 addr, u32 val);
76void iwl_set_bits_prph(struct iwl_priv *priv, u32 reg, u32 mask); 73void iwl_set_bits_prph(struct iwl_bus *bus, u32 reg, u32 mask);
77void iwl_set_bits_mask_prph(struct iwl_priv *priv, u32 reg, 74void iwl_set_bits_mask_prph(struct iwl_bus *bus, u32 reg,
78 u32 bits, u32 mask); 75 u32 bits, u32 mask);
79void iwl_clear_bits_prph(struct iwl_priv *priv, u32 reg, u32 mask); 76void iwl_clear_bits_prph(struct iwl_bus *bus, u32 reg, u32 mask);
80 77
81void _iwl_read_targ_mem_words(struct iwl_priv *priv, u32 addr, 78void _iwl_read_targ_mem_words(struct iwl_bus *bus, u32 addr,
82 void *buf, int words); 79 void *buf, int words);
83 80
84#define iwl_read_targ_mem_words(priv, addr, buf, bufsize) \ 81#define iwl_read_targ_mem_words(bus, addr, buf, bufsize) \
85 do { \ 82 do { \
86 BUILD_BUG_ON((bufsize) % sizeof(u32)); \ 83 BUILD_BUG_ON((bufsize) % sizeof(u32)); \
87 _iwl_read_targ_mem_words(priv, addr, buf, \ 84 _iwl_read_targ_mem_words(bus, addr, buf, \
88 (bufsize) / sizeof(u32));\ 85 (bufsize) / sizeof(u32));\
89 } while (0) 86 } while (0)
90 87
91u32 iwl_read_targ_mem(struct iwl_priv *priv, u32 addr); 88u32 iwl_read_targ_mem(struct iwl_bus *bus, u32 addr);
92void iwl_write_targ_mem(struct iwl_priv *priv, u32 addr, u32 val); 89void iwl_write_targ_mem(struct iwl_bus *bus, u32 addr, u32 val);
93#endif 90#endif