diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 02:11:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:30:29 -0400 |
commit | 83ed90155f98bd949735c2cc22d832b557a6d7d1 (patch) | |
tree | 795ecd1ebd93357a80895825310c19315a633e49 /drivers/net/wireless/iwlwifi/iwl-io.h | |
parent | a72b8b088c3465b28192c1a14ba97be8223a8cec (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.h | 61 |
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 | ||
39 | static inline void iwl_write8(struct iwl_priv *priv, u32 ofs, u8 val) | 36 | static 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 | ||
45 | static inline void iwl_write32(struct iwl_priv *priv, u32 ofs, u32 val) | 42 | static 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 | ||
51 | static inline u32 iwl_read32(struct iwl_priv *priv, u32 ofs) | 48 | static 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 | ||
58 | void iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask); | 55 | void iwl_set_bit(struct iwl_bus *bus, u32 reg, u32 mask); |
59 | void iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask); | 56 | void iwl_clear_bit(struct iwl_bus *bus, u32 reg, u32 mask); |
60 | 57 | ||
61 | int iwl_poll_bit(struct iwl_priv *priv, u32 addr, | 58 | int iwl_poll_bit(struct iwl_bus *bus, u32 addr, |
62 | u32 bits, u32 mask, int timeout); | 59 | u32 bits, u32 mask, int timeout); |
63 | int iwl_poll_direct_bit(struct iwl_priv *priv, u32 addr, u32 mask, | 60 | int iwl_poll_direct_bit(struct iwl_bus *bus, u32 addr, u32 mask, |
64 | int timeout); | 61 | int timeout); |
65 | 62 | ||
66 | int iwl_grab_nic_access_silent(struct iwl_priv *priv); | 63 | int iwl_grab_nic_access_silent(struct iwl_bus *bus); |
67 | int iwl_grab_nic_access(struct iwl_priv *priv); | 64 | int iwl_grab_nic_access(struct iwl_bus *bus); |
68 | void iwl_release_nic_access(struct iwl_priv *priv); | 65 | void iwl_release_nic_access(struct iwl_bus *bus); |
69 | 66 | ||
70 | u32 iwl_read_direct32(struct iwl_priv *priv, u32 reg); | 67 | u32 iwl_read_direct32(struct iwl_bus *bus, u32 reg); |
71 | void iwl_write_direct32(struct iwl_priv *priv, u32 reg, u32 value); | 68 | void iwl_write_direct32(struct iwl_bus *bus, u32 reg, u32 value); |
72 | 69 | ||
73 | 70 | ||
74 | u32 iwl_read_prph(struct iwl_priv *priv, u32 reg); | 71 | u32 iwl_read_prph(struct iwl_bus *bus, u32 reg); |
75 | void iwl_write_prph(struct iwl_priv *priv, u32 addr, u32 val); | 72 | void iwl_write_prph(struct iwl_bus *bus, u32 addr, u32 val); |
76 | void iwl_set_bits_prph(struct iwl_priv *priv, u32 reg, u32 mask); | 73 | void iwl_set_bits_prph(struct iwl_bus *bus, u32 reg, u32 mask); |
77 | void iwl_set_bits_mask_prph(struct iwl_priv *priv, u32 reg, | 74 | void iwl_set_bits_mask_prph(struct iwl_bus *bus, u32 reg, |
78 | u32 bits, u32 mask); | 75 | u32 bits, u32 mask); |
79 | void iwl_clear_bits_prph(struct iwl_priv *priv, u32 reg, u32 mask); | 76 | void iwl_clear_bits_prph(struct iwl_bus *bus, u32 reg, u32 mask); |
80 | 77 | ||
81 | void _iwl_read_targ_mem_words(struct iwl_priv *priv, u32 addr, | 78 | void _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 | ||
91 | u32 iwl_read_targ_mem(struct iwl_priv *priv, u32 addr); | 88 | u32 iwl_read_targ_mem(struct iwl_bus *bus, u32 addr); |
92 | void iwl_write_targ_mem(struct iwl_priv *priv, u32 addr, u32 val); | 89 | void iwl_write_targ_mem(struct iwl_bus *bus, u32 addr, u32 val); |
93 | #endif | 90 | #endif |