29 #include <linux/device.h>
30 #include <linux/export.h>
36 #define IWL_POLL_INTERVAL 10
40 iwl_write32(trans, reg, iwl_read32(trans, reg) | mask);
45 iwl_write32(trans, reg, iwl_read32(trans, reg) & ~mask);
53 __iwl_set_bit(trans, reg, mask);
54 spin_unlock_irqrestore(&trans->
reg_lock, flags);
63 __iwl_clear_bit(trans, reg, mask);
64 spin_unlock_irqrestore(&trans->
reg_lock, flags);
73 #ifdef CONFIG_IWLWIFI_DEBUG
78 v = iwl_read32(trans, reg);
81 iwl_write32(trans, reg, v);
82 spin_unlock_irqrestore(&trans->
reg_lock, flags);
92 if ((iwl_read32(trans, addr) & mask) == (bits & mask))
96 }
while (t < timeout);
149 WARN_ONCE(1,
"Timeout waiting for hardware access "
150 "(CSR_GP_CNTRL 0x%08x)\n", val);
180 value = iwl_read32(trans, reg);
182 spin_unlock_irqrestore(&trans->
reg_lock, flags);
194 iwl_write32(trans, reg, value);
197 spin_unlock_irqrestore(&trans->
reg_lock, flags);
211 }
while (t < timeout);
226 ((addr & 0x0000FFFF) | (3 << 24)));
237 val = __iwl_read_prph(trans, reg);
239 spin_unlock_irqrestore(&trans->
reg_lock, flags);
250 __iwl_write_prph(trans, addr, val);
253 spin_unlock_irqrestore(&trans->
reg_lock, flags);
263 __iwl_write_prph(trans, reg,
264 __iwl_read_prph(trans, reg) | mask);
267 spin_unlock_irqrestore(&trans->
reg_lock, flags);
278 __iwl_write_prph(trans, reg,
279 (__iwl_read_prph(trans, reg) & mask) | bits);
282 spin_unlock_irqrestore(&trans->
reg_lock, flags);
293 val = __iwl_read_prph(trans, reg);
294 __iwl_write_prph(trans, reg, (val & ~mask));
297 spin_unlock_irqrestore(&trans->
reg_lock, flags);
302 void *
buf,
int dwords)
311 for (offs = 0; offs < dwords; offs++)
315 spin_unlock_irqrestore(&trans->
reg_lock, flags);
330 void *
buf,
int dwords)
339 for (offs = 0; offs < dwords; offs++)
344 spin_unlock_irqrestore(&trans->
reg_lock, flags);