diff options
author | Christoph Hellwig <hch@lst.de> | 2007-10-25 05:15:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:03:25 -0500 |
commit | c8b0e6e19c0bcd30689cb6c6f64eb140f5d61894 (patch) | |
tree | 5c9ef861d391a3d8d56f3e24cd9920f19161f7d2 /drivers/net/wireless/iwlwifi/iwl-3945-io.h | |
parent | 5d08cd1dfdc57dc834c47eb9f023fcf861f3d6bf (diff) |
iwlwifi: cleanup Kconfig and ifdefs to split 3945 and 4965
Currently the iwl3945 & iwl4965 drivers share some common Kconfig
symbols. This split it up into options for the individual drivers
and gets rid of all the CONFIG_IWLWIFI cruft.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945-io.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-io.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-io.h b/drivers/net/wireless/iwlwifi/iwl-3945-io.h index 89253e133533..74a51798c232 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-io.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-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_IWL3945_DEBUG |
64 | static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl, | 64 | static 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_IWL3945_DEBUG |
78 | static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs) | 78 | static 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_IWL3945_DEBUG |
103 | static inline int __iwl_poll_bit(const char *f, u32 l, | 103 | static 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_IWL3945_DEBUG |
129 | static inline void __iwl_set_bit(const char *f, u32 l, | 129 | static 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_IWL3945_DEBUG |
146 | static inline void __iwl_clear_bit(const char *f, u32 l, | 146 | static 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_IWL3945_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_IWL3945_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_IWL3945_DEBUG |
201 | static inline int __iwl_grab_nic_access(const char *f, u32 l, | 201 | static 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 | ||
218 | static inline void _iwl_release_nic_access(struct iwl_priv *priv) | 218 | static inline void _iwl_release_nic_access(struct iwl_priv *priv) |
219 | { | 219 | { |
220 | #ifdef CONFIG_IWLWIFI_DEBUG | 220 | #ifdef CONFIG_IWL3945_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_IWL3945_DEBUG |
227 | static inline void __iwl_release_nic_access(const char *f, u32 l, | 227 | static 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_IWL3945_DEBUG |
248 | static inline u32 __iwl_read_direct32(const char *f, u32 l, | 248 | static 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_IWL3945_DEBUG |
270 | static void __iwl_write_direct32(u32 line, | 270 | static 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_IWL3945_DEBUG |
310 | static inline int __iwl_poll_direct_bit(const char *f, u32 l, | 310 | static 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_IWL3945_DEBUG |
336 | static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg) | 336 | static 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_IWL3945_DEBUG |
357 | static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv, | 357 | static 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_IWL3945_DEBUG |
374 | static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv, | 374 | static 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_IWL3945_DEBUG |
392 | static inline void __iwl_set_bits_mask_prph(u32 line, | 392 | static 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 | { |