aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-csr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
commitcd6362befe4cc7bf589a5236d2a780af2d47bcc9 (patch)
tree3bd4e13ec3f92a00dc4f6c3d65e820b54dbfe46e /drivers/net/wireless/iwlwifi/iwl-csr.h
parent0f1b1e6d73cb989ce2c071edc57deade3b084dfe (diff)
parentb1586f099ba897542ece36e8a23c1a62907261ef (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Here is my initial pull request for the networking subsystem during this merge window: 1) Support for ESN in AH (RFC 4302) from Fan Du. 2) Add full kernel doc for ethtool command structures, from Ben Hutchings. 3) Add BCM7xxx PHY driver, from Florian Fainelli. 4) Export computed TCP rate information in netlink socket dumps, from Eric Dumazet. 5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas Dichtel. 6) Convert many drivers to pci_enable_msix_range(), from Alexander Gordeev. 7) Record SKB timestamps more efficiently, from Eric Dumazet. 8) Switch to microsecond resolution for TCP round trip times, also from Eric Dumazet. 9) Clean up and fix 6lowpan fragmentation handling by making use of the existing inet_frag api for it's implementation. 10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss. 11) Auto size SKB lengths when composing netlink messages based upon past message sizes used, from Eric Dumazet. 12) qdisc dumps can take a long time, add a cond_resched(), From Eric Dumazet. 13) Sanitize netpoll core and drivers wrt. SKB handling semantics. Get rid of never-used-in-tree netpoll RX handling. From Eric W Biederman. 14) Support inter-address-family and namespace changing in VTI tunnel driver(s). From Steffen Klassert. 15) Add Altera TSE driver, from Vince Bridgers. 16) Optimizing csum_replace2() so that it doesn't adjust the checksum by checksumming the entire header, from Eric Dumazet. 17) Expand BPF internal implementation for faster interpreting, more direct translations into JIT'd code, and much cleaner uses of BPF filtering in non-socket ocntexts. From Daniel Borkmann and Alexei Starovoitov" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits) netpoll: Use skb_irq_freeable to make zap_completion_queue safe. net: Add a test to see if a skb is freeable in irq context qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port' net: ptp: move PTP classifier in its own file net: sxgbe: make "core_ops" static net: sxgbe: fix logical vs bitwise operation net: sxgbe: sxgbe_mdio_register() frees the bus Call efx_set_channels() before efx->type->dimension_resources() xen-netback: disable rogue vif in kthread context net/mlx4: Set proper build dependancy with vxlan be2net: fix build dependency on VxLAN mac802154: make csma/cca parameters per-wpan mac802154: allow only one WPAN to be up at any given time net: filter: minor: fix kdoc in __sk_run_filter netlink: don't compare the nul-termination in nla_strcmp can: c_can: Avoid led toggling for every packet. can: c_can: Simplify TX interrupt cleanup can: c_can: Store dlc private can: c_can: Reduce register access can: c_can: Make the code readable ...
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-csr.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-csr.h66
1 files changed, 36 insertions, 30 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 9d325516c42d..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
@@ -395,37 +405,33 @@
395#define CSR_DRAM_INT_TBL_ENABLE (1 << 31) 405#define CSR_DRAM_INT_TBL_ENABLE (1 << 31)
396#define CSR_DRAM_INIT_TBL_WRAP_CHECK (1 << 27) 406#define CSR_DRAM_INIT_TBL_WRAP_CHECK (1 << 27)
397 407
398/* SECURE boot registers */ 408/*
399#define CSR_SECURE_BOOT_CONFIG_ADDR (0x100) 409 * SHR target access (Shared block memory space)
400enum secure_boot_config_reg { 410 *
401 CSR_SECURE_BOOT_CONFIG_INSPECTOR_BURNED_IN_OTP = 0x00000001, 411 * Shared internal registers can be accessed directly from PCI bus through SHR
402 CSR_SECURE_BOOT_CONFIG_INSPECTOR_NOT_REQ = 0x00000002, 412 * arbiter without need for the MAC HW to be powered up. This is possible due to
403}; 413 * indirect read/write via HEEP_CTRL_WRD_PCIEX_CTRL (0xEC) and
404 414 * HEEP_CTRL_WRD_PCIEX_DATA (0xF4) registers.
405#define CSR_SECURE_BOOT_CPU1_STATUS_ADDR (0x100) 415 *
406#define CSR_SECURE_BOOT_CPU2_STATUS_ADDR (0x100) 416 * Use iwl_write32()/iwl_read32() family to access these registers. The MAC HW
407enum secure_boot_status_reg { 417 * need not be powered up so no "grab inc access" is required.
408 CSR_SECURE_BOOT_CPU_STATUS_VERF_STATUS = 0x00000003, 418 */
409 CSR_SECURE_BOOT_CPU_STATUS_VERF_COMPLETED = 0x00000002,
410 CSR_SECURE_BOOT_CPU_STATUS_VERF_SUCCESS = 0x00000004,
411 CSR_SECURE_BOOT_CPU_STATUS_VERF_FAIL = 0x00000008,
412 CSR_SECURE_BOOT_CPU_STATUS_SIGN_VERF_FAIL = 0x00000010,
413};
414
415#define CSR_UCODE_LOAD_STATUS_ADDR (0x100)
416enum secure_load_status_reg {
417 CSR_CPU_STATUS_LOADING_STARTED = 0x00000001,
418 CSR_CPU_STATUS_LOADING_COMPLETED = 0x00000002,
419 CSR_CPU_STATUS_NUM_OF_LAST_COMPLETED = 0x000000F8,
420 CSR_CPU_STATUS_NUM_OF_LAST_LOADED_BLOCK = 0x0000FF00,
421};
422
423#define CSR_SECURE_INSPECTOR_CODE_ADDR (0x100)
424#define CSR_SECURE_INSPECTOR_DATA_ADDR (0x100)
425
426#define CSR_SECURE_TIME_OUT (100)
427 419
428#define FH_TCSR_0_REG0 (0x1D00) 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)
429 435
430/* 436/*
431 * HBUS (Host-side Bus) 437 * HBUS (Host-side Bus)