diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-csr.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-csr.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index f13dec9ad9c9..fe129c94ae3e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -139,6 +139,13 @@ | |||
139 | #define CSR_ANA_PLL_CFG (CSR_BASE+0x20c) | 139 | #define CSR_ANA_PLL_CFG (CSR_BASE+0x20c) |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * CSR HW resources monitor registers | ||
143 | */ | ||
144 | #define CSR_MONITOR_CFG_REG (CSR_BASE+0x214) | ||
145 | #define CSR_MONITOR_STATUS_REG (CSR_BASE+0x228) | ||
146 | #define CSR_MONITOR_XTAL_RESOURCES (0x00000010) | ||
147 | |||
148 | /* | ||
142 | * CSR Hardware Revision Workaround Register. Indicates hardware rev; | 149 | * CSR Hardware Revision Workaround Register. Indicates hardware rev; |
143 | * "step" determines CCK backoff for txpower calculation. Used for 4965 only. | 150 | * "step" determines CCK backoff for txpower calculation. Used for 4965 only. |
144 | * See also CSR_HW_REV register. | 151 | * See also CSR_HW_REV register. |
@@ -173,6 +180,7 @@ | |||
173 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_READY (0x00400000) /* PCI_OWN_SEM */ | 180 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_READY (0x00400000) /* PCI_OWN_SEM */ |
174 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE (0x02000000) /* ME_OWN */ | 181 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE (0x02000000) /* ME_OWN */ |
175 | #define CSR_HW_IF_CONFIG_REG_PREPARE (0x08000000) /* WAKE_ME */ | 182 | #define CSR_HW_IF_CONFIG_REG_PREPARE (0x08000000) /* WAKE_ME */ |
183 | #define CSR_HW_IF_CONFIG_REG_PERSIST_MODE (0x40000000) /* PERSISTENCE */ | ||
176 | 184 | ||
177 | #define CSR_INT_PERIODIC_DIS (0x00) /* disable periodic int*/ | 185 | #define CSR_INT_PERIODIC_DIS (0x00) /* disable periodic int*/ |
178 | #define CSR_INT_PERIODIC_ENA (0xFF) /* 255*32 usec ~ 8 msec*/ | 186 | #define CSR_INT_PERIODIC_ENA (0xFF) /* 255*32 usec ~ 8 msec*/ |
@@ -240,6 +248,7 @@ | |||
240 | * 001 -- MAC power-down | 248 | * 001 -- MAC power-down |
241 | * 010 -- PHY (radio) power-down | 249 | * 010 -- PHY (radio) power-down |
242 | * 011 -- Error | 250 | * 011 -- Error |
251 | * 10: XTAL ON request | ||
243 | * 9-6: SYS_CONFIG | 252 | * 9-6: SYS_CONFIG |
244 | * Indicates current system configuration, reflecting pins on chip | 253 | * Indicates current system configuration, reflecting pins on chip |
245 | * as forced high/low by device circuit board. | 254 | * as forced high/low by device circuit board. |
@@ -271,6 +280,7 @@ | |||
271 | #define CSR_GP_CNTRL_REG_FLAG_INIT_DONE (0x00000004) | 280 | #define CSR_GP_CNTRL_REG_FLAG_INIT_DONE (0x00000004) |
272 | #define CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ (0x00000008) | 281 | #define CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ (0x00000008) |
273 | #define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP (0x00000010) | 282 | #define CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP (0x00000010) |
283 | #define CSR_GP_CNTRL_REG_FLAG_XTAL_ON (0x00000400) | ||
274 | 284 | ||
275 | #define CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN (0x00000001) | 285 | #define CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN (0x00000001) |
276 | 286 | ||
@@ -396,6 +406,34 @@ | |||
396 | #define CSR_DRAM_INIT_TBL_WRAP_CHECK (1 << 27) | 406 | #define CSR_DRAM_INIT_TBL_WRAP_CHECK (1 << 27) |
397 | 407 | ||
398 | /* | 408 | /* |
409 | * SHR target access (Shared block memory space) | ||
410 | * | ||
411 | * Shared internal registers can be accessed directly from PCI bus through SHR | ||
412 | * arbiter without need for the MAC HW to be powered up. This is possible due to | ||
413 | * indirect read/write via HEEP_CTRL_WRD_PCIEX_CTRL (0xEC) and | ||
414 | * HEEP_CTRL_WRD_PCIEX_DATA (0xF4) registers. | ||
415 | * | ||
416 | * Use iwl_write32()/iwl_read32() family to access these registers. The MAC HW | ||
417 | * need not be powered up so no "grab inc access" is required. | ||
418 | */ | ||
419 | |||
420 | /* | ||
421 | * Registers for accessing shared registers (e.g. SHR_APMG_GP1, | ||
422 | * SHR_APMG_XTAL_CFG). For example, to read from SHR_APMG_GP1 register (0x1DC), | ||
423 | * first, write to the control register: | ||
424 | * HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register) | ||
425 | * HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 2 (read access) | ||
426 | * second, read from the data register HEEP_CTRL_WRD_PCIEX_DATA[31:0]. | ||
427 | * | ||
428 | * To write the register, first, write to the data register | ||
429 | * HEEP_CTRL_WRD_PCIEX_DATA[31:0] and then: | ||
430 | * HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register) | ||
431 | * HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 3 (write access) | ||
432 | */ | ||
433 | #define HEEP_CTRL_WRD_PCIEX_CTRL_REG (CSR_BASE+0x0ec) | ||
434 | #define HEEP_CTRL_WRD_PCIEX_DATA_REG (CSR_BASE+0x0f4) | ||
435 | |||
436 | /* | ||
399 | * HBUS (Host-side Bus) | 437 | * HBUS (Host-side Bus) |
400 | * | 438 | * |
401 | * HBUS registers are mapped directly into PCI bus space, but are used | 439 | * HBUS registers are mapped directly into PCI bus space, but are used |