diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2007-11-28 22:10:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:30 -0500 |
commit | 483fd7e5ffa527daeaff006e033225e273d110f8 (patch) | |
tree | 1b95e5064edcb8742bb022b9f119fadca106b179 /drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |
parent | 4d3cf5f7c2290c6cbe7ae1722bf2f938c81ef887 (diff) |
iwlwifi: document Tx registers
Document Tx registers
Clean up unused definitions
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965-hw.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index f194d813f49b..e7c7f71db8e1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |||
@@ -567,7 +567,8 @@ struct iwl4965_eeprom { | |||
567 | 567 | ||
568 | /* | 568 | /* |
569 | * Per-Tx-queue write pointer (index, really!) (3945 and 4965). | 569 | * Per-Tx-queue write pointer (index, really!) (3945 and 4965). |
570 | * Indicates index to next TFD that driver will fill (1 past latest filled). | 570 | * Driver sets this to indicate index to next TFD that driver will fill |
571 | * (1 past latest filled). | ||
571 | * Bit usage: | 572 | * Bit usage: |
572 | * 0-7: queue write index (0-255) | 573 | * 0-7: queue write index (0-255) |
573 | * 11-8: queue selector (0-15) | 574 | * 11-8: queue selector (0-15) |
@@ -576,25 +577,6 @@ struct iwl4965_eeprom { | |||
576 | 577 | ||
577 | #define HBUS_TARG_MBX_C (HBUS_BASE+0x030) | 578 | #define HBUS_TARG_MBX_C (HBUS_BASE+0x030) |
578 | 579 | ||
579 | /*=== FH (data Flow Handler) ===*/ | ||
580 | #define FH_BASE (0x800) | ||
581 | |||
582 | #define FH_RSCSR_CHNL0_WPTR (FH_RSCSR_CHNL0_RBDCB_WPTR_REG) | ||
583 | |||
584 | /* RSSR */ | ||
585 | #define FH_RSSR_CTRL (FH_RSSR_TABLE+0x000) | ||
586 | #define FH_RSSR_STATUS (FH_RSSR_TABLE+0x004) | ||
587 | /* TCSR */ | ||
588 | #define FH_TCSR(_channel) (FH_TCSR_TABLE+(_channel)*0x20) | ||
589 | #define FH_TCSR_CONFIG(_channel) (FH_TCSR(_channel)+0x00) | ||
590 | #define FH_TCSR_CREDIT(_channel) (FH_TCSR(_channel)+0x04) | ||
591 | #define FH_TCSR_BUFF_STTS(_channel) (FH_TCSR(_channel)+0x08) | ||
592 | /* TSSR */ | ||
593 | #define FH_TSSR_CBB_BASE (FH_TSSR_TABLE+0x000) | ||
594 | #define FH_TSSR_MSG_CONFIG (FH_TSSR_TABLE+0x008) | ||
595 | #define FH_TSSR_TX_STATUS (FH_TSSR_TABLE+0x010) | ||
596 | |||
597 | |||
598 | #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED (0x00000004) | 580 | #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED (0x00000004) |
599 | 581 | ||
600 | #define TFD_QUEUE_SIZE_MAX (256) | 582 | #define TFD_QUEUE_SIZE_MAX (256) |
@@ -1425,6 +1407,7 @@ enum { | |||
1425 | * NOTE: For 256-entry circular buffer, use only bits [7:0]. | 1407 | * NOTE: For 256-entry circular buffer, use only bits [7:0]. |
1426 | */ | 1408 | */ |
1427 | #define FH_RSCSR_CHNL0_RBDCB_WPTR_REG (FH_MEM_RSCSR_CHNL0 + 0x008) | 1409 | #define FH_RSCSR_CHNL0_RBDCB_WPTR_REG (FH_MEM_RSCSR_CHNL0 + 0x008) |
1410 | #define FH_RSCSR_CHNL0_WPTR (FH_RSCSR_CHNL0_RBDCB_WPTR_REG) | ||
1428 | 1411 | ||
1429 | 1412 | ||
1430 | /** | 1413 | /** |
@@ -1500,15 +1483,55 @@ enum { | |||
1500 | 1483 | ||
1501 | #define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) | 1484 | #define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) |
1502 | 1485 | ||
1503 | /* TCSR */ | 1486 | |
1487 | /** | ||
1488 | * Transmit DMA Channel Control/Status Registers (TCSR) | ||
1489 | * | ||
1490 | * 4965 has one configuration register for each of 8 Tx DMA/FIFO channels | ||
1491 | * supported in hardware (don't confuse these with the 16 Tx queues in DRAM, | ||
1492 | * which feed the DMA/FIFO channels); config regs are separated by 0x20 bytes. | ||
1493 | * | ||
1494 | * To use a Tx DMA channel, driver must initialize its | ||
1495 | * IWL_FH_TCSR_CHNL_TX_CONFIG_REG(chnl) with: | ||
1496 | * | ||
1497 | * IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE | | ||
1498 | * IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL | ||
1499 | * | ||
1500 | * All other bits should be 0. | ||
1501 | * | ||
1502 | * Bit fields: | ||
1503 | * 31-30: Tx DMA channel enable: '00' off/pause, '01' pause at end of frame, | ||
1504 | * '10' operate normally | ||
1505 | * 29- 4: Reserved, set to "0" | ||
1506 | * 3: Enable internal DMA requests (1, normal operation), disable (0) | ||
1507 | * 2- 0: Reserved, set to "0" | ||
1508 | */ | ||
1504 | #define IWL_FH_TCSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xD00) | 1509 | #define IWL_FH_TCSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xD00) |
1505 | #define IWL_FH_TCSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xE60) | 1510 | #define IWL_FH_TCSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xE60) |
1506 | 1511 | ||
1512 | /* Find Control/Status reg for given Tx DMA/FIFO channel */ | ||
1507 | #define IWL_FH_TCSR_CHNL_TX_CONFIG_REG(_chnl) \ | 1513 | #define IWL_FH_TCSR_CHNL_TX_CONFIG_REG(_chnl) \ |
1508 | (IWL_FH_TCSR_LOWER_BOUND + 0x20 * _chnl) | 1514 | (IWL_FH_TCSR_LOWER_BOUND + 0x20 * _chnl) |
1509 | 1515 | ||
1510 | /* TSSR Area - Tx shared status registers */ | 1516 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL (0x00000000) |
1511 | /* TSSR */ | 1517 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008) |
1518 | |||
1519 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000) | ||
1520 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE_EOF (0x40000000) | ||
1521 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000) | ||
1522 | |||
1523 | /** | ||
1524 | * Tx Shared Status Registers (TSSR) | ||
1525 | * | ||
1526 | * After stopping Tx DMA channel (writing 0 to | ||
1527 | * IWL_FH_TCSR_CHNL_TX_CONFIG_REG(chnl)), driver must poll | ||
1528 | * IWL_FH_TSSR_TX_STATUS_REG until selected Tx channel is idle | ||
1529 | * (channel's buffers empty | no pending requests). | ||
1530 | * | ||
1531 | * Bit fields: | ||
1532 | * 31-24: 1 = Channel buffers empty (channel 7:0) | ||
1533 | * 23-16: 1 = No pending requests (channel 7:0) | ||
1534 | */ | ||
1512 | #define IWL_FH_TSSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xEA0) | 1535 | #define IWL_FH_TSSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xEA0) |
1513 | #define IWL_FH_TSSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xEC0) | 1536 | #define IWL_FH_TSSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xEC0) |
1514 | 1537 | ||
@@ -1523,9 +1546,6 @@ enum { | |||
1523 | (IWL_FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_chnl) | \ | 1546 | (IWL_FH_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_chnl) | \ |
1524 | IWL_FH_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_chnl)) | 1547 | IWL_FH_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_chnl)) |
1525 | 1548 | ||
1526 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008) | ||
1527 | |||
1528 | #define IWL_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000) | ||
1529 | 1549 | ||
1530 | #define SCD_WIN_SIZE 64 | 1550 | #define SCD_WIN_SIZE 64 |
1531 | #define SCD_FRAME_LIMIT 64 | 1551 | #define SCD_FRAME_LIMIT 64 |