aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965-io.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-io.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-io.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-io.h b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
index 1ffa8f1e17c4..5c497e4beea2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-io.h
@@ -60,7 +60,7 @@
60 */ 60 */
61 61
62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs)) 62#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs))
63#ifdef CONFIG_IWLWIFI_DEBUG 63#ifdef CONFIG_IWL4965_DEBUG
64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, 64static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
65 u32 ofs, u32 val) 65 u32 ofs, u32 val)
66{ 66{
@@ -74,7 +74,7 @@ static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
74#endif 74#endif
75 75
76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs)) 76#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs))
77#ifdef CONFIG_IWLWIFI_DEBUG 77#ifdef CONFIG_IWL4965_DEBUG
78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) 78static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs)
79{ 79{
80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l); 80 IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
@@ -99,7 +99,7 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
99 99
100 return -ETIMEDOUT; 100 return -ETIMEDOUT;
101} 101}
102#ifdef CONFIG_IWLWIFI_DEBUG 102#ifdef CONFIG_IWL4965_DEBUG
103static inline int __iwl_poll_bit(const char *f, u32 l, 103static inline int __iwl_poll_bit(const char *f, u32 l,
104 struct iwl_priv *priv, u32 addr, 104 struct iwl_priv *priv, u32 addr,
105 u32 bits, u32 mask, int timeout) 105 u32 bits, u32 mask, int timeout)
@@ -125,7 +125,7 @@ static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
125{ 125{
126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask); 126 _iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask);
127} 127}
128#ifdef CONFIG_IWLWIFI_DEBUG 128#ifdef CONFIG_IWL4965_DEBUG
129static inline void __iwl_set_bit(const char *f, u32 l, 129static inline void __iwl_set_bit(const char *f, u32 l,
130 struct iwl_priv *priv, u32 reg, u32 mask) 130 struct iwl_priv *priv, u32 reg, u32 mask)
131{ 131{
@@ -142,7 +142,7 @@ static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
142{ 142{
143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask); 143 _iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask);
144} 144}
145#ifdef CONFIG_IWLWIFI_DEBUG 145#ifdef CONFIG_IWL4965_DEBUG
146static inline void __iwl_clear_bit(const char *f, u32 l, 146static inline void __iwl_clear_bit(const char *f, u32 l,
147 struct iwl_priv *priv, u32 reg, u32 mask) 147 struct iwl_priv *priv, u32 reg, u32 mask)
148{ 148{
@@ -160,7 +160,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
160 int ret; 160 int ret;
161 u32 gp_ctl; 161 u32 gp_ctl;
162 162
163#ifdef CONFIG_IWLWIFI_DEBUG 163#ifdef CONFIG_IWL4965_DEBUG
164 if (atomic_read(&priv->restrict_refcnt)) 164 if (atomic_read(&priv->restrict_refcnt))
165 return 0; 165 return 0;
166#endif 166#endif
@@ -191,13 +191,13 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
191 return -EIO; 191 return -EIO;
192 } 192 }
193 193
194#ifdef CONFIG_IWLWIFI_DEBUG 194#ifdef CONFIG_IWL4965_DEBUG
195 atomic_inc(&priv->restrict_refcnt); 195 atomic_inc(&priv->restrict_refcnt);
196#endif 196#endif
197 return 0; 197 return 0;
198} 198}
199 199
200#ifdef CONFIG_IWLWIFI_DEBUG 200#ifdef CONFIG_IWL4965_DEBUG
201static inline int __iwl_grab_nic_access(const char *f, u32 l, 201static inline int __iwl_grab_nic_access(const char *f, u32 l,
202 struct iwl_priv *priv) 202 struct iwl_priv *priv)
203{ 203{
@@ -217,13 +217,13 @@ static inline int __iwl_grab_nic_access(const char *f, u32 l,
217 217
218static inline void _iwl_release_nic_access(struct iwl_priv *priv) 218static inline void _iwl_release_nic_access(struct iwl_priv *priv)
219{ 219{
220#ifdef CONFIG_IWLWIFI_DEBUG 220#ifdef CONFIG_IWL4965_DEBUG
221 if (atomic_dec_and_test(&priv->restrict_refcnt)) 221 if (atomic_dec_and_test(&priv->restrict_refcnt))
222#endif 222#endif
223 _iwl_clear_bit(priv, CSR_GP_CNTRL, 223 _iwl_clear_bit(priv, CSR_GP_CNTRL,
224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 224 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
225} 225}
226#ifdef CONFIG_IWLWIFI_DEBUG 226#ifdef CONFIG_IWL4965_DEBUG
227static inline void __iwl_release_nic_access(const char *f, u32 l, 227static inline void __iwl_release_nic_access(const char *f, u32 l,
228 struct iwl_priv *priv) 228 struct iwl_priv *priv)
229{ 229{
@@ -244,7 +244,7 @@ static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg)
244{ 244{
245 return _iwl_read32(priv, reg); 245 return _iwl_read32(priv, reg);
246} 246}
247#ifdef CONFIG_IWLWIFI_DEBUG 247#ifdef CONFIG_IWL4965_DEBUG
248static inline u32 __iwl_read_direct32(const char *f, u32 l, 248static inline u32 __iwl_read_direct32(const char *f, u32 l,
249 struct iwl_priv *priv, u32 reg) 249 struct iwl_priv *priv, u32 reg)
250{ 250{
@@ -266,7 +266,7 @@ static inline void _iwl_write_direct32(struct iwl_priv *priv,
266{ 266{
267 _iwl_write32(priv, reg, value); 267 _iwl_write32(priv, reg, value);
268} 268}
269#ifdef CONFIG_IWLWIFI_DEBUG 269#ifdef CONFIG_IWL4965_DEBUG
270static void __iwl_write_direct32(u32 line, 270static void __iwl_write_direct32(u32 line,
271 struct iwl_priv *priv, u32 reg, u32 value) 271 struct iwl_priv *priv, u32 reg, u32 value)
272{ 272{
@@ -306,7 +306,7 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
306 return -ETIMEDOUT; 306 return -ETIMEDOUT;
307} 307}
308 308
309#ifdef CONFIG_IWLWIFI_DEBUG 309#ifdef CONFIG_IWL4965_DEBUG
310static inline int __iwl_poll_direct_bit(const char *f, u32 l, 310static inline int __iwl_poll_direct_bit(const char *f, u32 l,
311 struct iwl_priv *priv, 311 struct iwl_priv *priv,
312 u32 addr, u32 mask, int timeout) 312 u32 addr, u32 mask, int timeout)
@@ -332,7 +332,7 @@ static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)
332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24)); 332 _iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT); 333 return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
334} 334}
335#ifdef CONFIG_IWLWIFI_DEBUG 335#ifdef CONFIG_IWL4965_DEBUG
336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) 336static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
337{ 337{
338 if (!atomic_read(&priv->restrict_refcnt)) 338 if (!atomic_read(&priv->restrict_refcnt))
@@ -353,7 +353,7 @@ static inline void _iwl_write_prph(struct iwl_priv *priv,
353 ((addr & 0x0000FFFF) | (3 << 24))); 353 ((addr & 0x0000FFFF) | (3 << 24)));
354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val); 354 _iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
355} 355}
356#ifdef CONFIG_IWLWIFI_DEBUG 356#ifdef CONFIG_IWL4965_DEBUG
357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, 357static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
358 u32 addr, u32 val) 358 u32 addr, u32 val)
359{ 359{
@@ -370,7 +370,7 @@ static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
370 370
371#define _iwl_set_bits_prph(priv, reg, mask) \ 371#define _iwl_set_bits_prph(priv, reg, mask) \
372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask)) 372 _iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask))
373#ifdef CONFIG_IWLWIFI_DEBUG 373#ifdef CONFIG_IWL4965_DEBUG
374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, 374static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
375 u32 reg, u32 mask) 375 u32 reg, u32 mask)
376{ 376{
@@ -388,7 +388,7 @@ static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \ 388#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \
389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits)) 389 _iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits))
390 390
391#ifdef CONFIG_IWLWIFI_DEBUG 391#ifdef CONFIG_IWL4965_DEBUG
392static inline void __iwl_set_bits_mask_prph(u32 line, 392static inline void __iwl_set_bits_mask_prph(u32 line,
393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask) 393 struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
394{ 394{