aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-11-12 16:14:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-25 16:41:20 -0500
commite0737a77d6cba100dea7e53bf490d67d110bc037 (patch)
treed7e02b22ae0b82340e468a3fdc62d2cb92951ac5 /drivers/net/wireless/iwlwifi
parent34faf780cf342b2c83ae40a2eecf33e55f7002a5 (diff)
iwlwifi: iwl-fh.h cleanup
This patch fix value of upper FH register bound plus it reorders and groups registers in more readable way Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Zhu Yi <yi.zhu@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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fh.h41
1 files changed, 17 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
index 694ebb0d2ecf..bc20acb36aa6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
@@ -72,7 +72,7 @@
72 * Addresses are offsets from device's PCI hardware base address. 72 * Addresses are offsets from device's PCI hardware base address.
73 */ 73 */
74#define FH_MEM_LOWER_BOUND (0x1000) 74#define FH_MEM_LOWER_BOUND (0x1000)
75#define FH_MEM_UPPER_BOUND (0x1EF0) 75#define FH_MEM_UPPER_BOUND (0x2000)
76 76
77/** 77/**
78 * Keep-Warm (KW) buffer base address. 78 * Keep-Warm (KW) buffer base address.
@@ -268,6 +268,8 @@
268 268
269#define FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME (0x00008000) 269#define FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME (0x00008000)
270 270
271#define FH_RSCSR_FRAME_SIZE_MSK (0x00003FFF) /* bits 0-13 */
272
271 273
272/** 274/**
273 * Rx Shared Status Registers (RSSR) 275 * Rx Shared Status Registers (RSSR)
@@ -294,6 +296,13 @@
294 296
295#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28 297#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28
296 298
299/* TFDB Area - TFDs buffer table */
300#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF)
301#define FH_TFDIB_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x900)
302#define FH_TFDIB_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0x958)
303#define FH_TFDIB_CTRL0_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl))
304#define FH_TFDIB_CTRL1_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl) + 0x4)
305
297/** 306/**
298 * Transmit DMA Channel Control/Status Registers (TCSR) 307 * Transmit DMA Channel Control/Status Registers (TCSR)
299 * 308 *
@@ -323,6 +332,7 @@
323#define FH49_TCSR_CHNL_NUM (7) 332#define FH49_TCSR_CHNL_NUM (7)
324#define FH50_TCSR_CHNL_NUM (8) 333#define FH50_TCSR_CHNL_NUM (8)
325 334
335/* TCSR: tx_config register values */
326#define FH_TCSR_CHNL_TX_CONFIG_REG(_chnl) \ 336#define FH_TCSR_CHNL_TX_CONFIG_REG(_chnl) \
327 (FH_TCSR_LOWER_BOUND + 0x20 * (_chnl)) 337 (FH_TCSR_LOWER_BOUND + 0x20 * (_chnl))
328#define FH_TCSR_CHNL_TX_CREDIT_REG(_chnl) \ 338#define FH_TCSR_CHNL_TX_CREDIT_REG(_chnl) \
@@ -379,31 +389,13 @@
379 (FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_chnl) | \ 389 (FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_chnl) | \
380 FH_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_chnl)) 390 FH_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_chnl))
381 391
382
383
384#define FH_REGS_LOWER_BOUND (0x1000)
385#define FH_REGS_UPPER_BOUND (0x2000)
386
387/* Tx service channels */ 392/* Tx service channels */
388#define FH_SRVC_CHNL (9) 393#define FH_SRVC_CHNL (9)
389#define FH_SRVC_LOWER_BOUND (FH_REGS_LOWER_BOUND + 0x9C8) 394#define FH_SRVC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9C8)
390#define FH_SRVC_UPPER_BOUND (FH_REGS_LOWER_BOUND + 0x9D0) 395#define FH_SRVC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0)
391#define FH_SRVC_CHNL_SRAM_ADDR_REG(_chnl) \ 396#define FH_SRVC_CHNL_SRAM_ADDR_REG(_chnl) \
392 (FH_SRVC_LOWER_BOUND + ((_chnl) - 9) * 0x4) 397 (FH_SRVC_LOWER_BOUND + ((_chnl) - 9) * 0x4)
393 398
394/* TFDB Area - TFDs buffer table */
395#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF)
396#define FH_TFDIB_LOWER_BOUND (FH_REGS_LOWER_BOUND + 0x900)
397#define FH_TFDIB_UPPER_BOUND (FH_REGS_LOWER_BOUND + 0x958)
398#define FH_TFDIB_CTRL0_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl))
399#define FH_TFDIB_CTRL1_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl) + 0x4)
400
401/* TCSR: tx_config register values */
402#define FH_RSCSR_FRAME_SIZE_MSK (0x00003FFF) /* bits 0-13 */
403
404#define TFD_QUEUE_SIZE_MAX (256)
405#define TFD_QUEUE_SIZE_BC_DUP (64)
406#define TFD_QUEUE_BC_SIZE (TFD_QUEUE_SIZE_MAX + TFD_QUEUE_SIZE_BC_DUP)
407 399
408/** 400/**
409 * struct iwl_rb_status - reseve buffer status 401 * struct iwl_rb_status - reseve buffer status
@@ -423,9 +415,10 @@ struct iwl_rb_status {
423} __attribute__ ((packed)); 415} __attribute__ ((packed));
424 416
425 417
426 418#define TFD_QUEUE_SIZE_MAX (256)
419#define TFD_QUEUE_SIZE_BC_DUP (64)
420#define TFD_QUEUE_BC_SIZE (TFD_QUEUE_SIZE_MAX + TFD_QUEUE_SIZE_BC_DUP)
427#define IWL_TX_DMA_MASK DMA_BIT_MASK(36) 421#define IWL_TX_DMA_MASK DMA_BIT_MASK(36)
428
429#define IWL_NUM_OF_TBS 20 422#define IWL_NUM_OF_TBS 20
430 423
431static inline u8 iwl_get_dma_hi_addr(dma_addr_t addr) 424static inline u8 iwl_get_dma_hi_addr(dma_addr_t addr)