aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-io.h
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2009-11-06 17:53:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 15:23:47 -0500
commita7e6611034530fce62f5499f77dd4fb6cde4d130 (patch)
tree852d908158f37fdabf966c90bb9cfd0eba080763 /drivers/net/wireless/iwlwifi/iwl-io.h
parent2a3b793d6a0ff30ad4a541230a6dba2ecb6fff1b (diff)
iwlwifi: Add comments about MAC_ACCESS_REQ
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index 0a078b082833..d0a358c9d96b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -200,6 +200,26 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
200 200
201 /* this bit wakes up the NIC */ 201 /* this bit wakes up the NIC */
202 _iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 202 _iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
203
204 /*
205 * These bits say the device is running, and should keep running for
206 * at least a short while (at least as long as MAC_ACCESS_REQ stays 1),
207 * but they do not indicate that embedded SRAM is restored yet;
208 * 3945 and 4965 have volatile SRAM, and must save/restore contents
209 * to/from host DRAM when sleeping/waking for power-saving.
210 * Each direction takes approximately 1/4 millisecond; with this
211 * overhead, it's a good idea to grab and hold MAC_ACCESS_REQUEST if a
212 * series of register accesses are expected (e.g. reading Event Log),
213 * to keep device from sleeping.
214 *
215 * CSR_UCODE_DRV_GP1 register bit MAC_SLEEP == 0 indicates that
216 * SRAM is okay/restored. We don't check that here because this call
217 * is just for hardware register access; but GP1 MAC_SLEEP check is a
218 * good idea before accessing 3945/4965 SRAM (e.g. reading Event Log).
219 *
220 * 5000 series and later (including 1000 series) have non-volatile SRAM,
221 * and do not save/restore SRAM when power cycling.
222 */
203 ret = _iwl_poll_bit(priv, CSR_GP_CNTRL, 223 ret = _iwl_poll_bit(priv, CSR_GP_CNTRL,
204 CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN, 224 CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
205 (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY | 225 (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |