aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-08-31 08:20:23 -0400
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 08:20:39 -0500
commit9a95b37015de03aa82bf340b3ee8e97af11be910 (patch)
tree68bd490ab464f1782c82fb725fb995df60163910
parent53143a1809db521ff34371f066bfd8f1619ec2c9 (diff)
iwlegacy: use FH49_ prefix in 4965 code
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c96
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c2
-rw-r--r--drivers/net/wireless/iwlegacy/common.h2
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-fh.h206
4 files changed, 153 insertions, 153 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 82b6a7b8624a..9e3f74c8e9a7 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -138,22 +138,22 @@ int il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq)
138 u32 rb_timeout = 0; 138 u32 rb_timeout = 0;
139 139
140 if (il->cfg->mod_params->amsdu_size_8K) 140 if (il->cfg->mod_params->amsdu_size_8K)
141 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; 141 rb_size = FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K;
142 else 142 else
143 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K; 143 rb_size = FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K;
144 144
145 /* Stop Rx DMA */ 145 /* Stop Rx DMA */
146 il_wr(il, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); 146 il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG, 0);
147 147
148 /* Reset driver's Rx queue write idx */ 148 /* Reset driver's Rx queue write idx */
149 il_wr(il, FH_RSCSR_CHNL0_RBDCB_WPTR_REG, 0); 149 il_wr(il, FH49_RSCSR_CHNL0_RBDCB_WPTR_REG, 0);
150 150
151 /* Tell device where to find RBD circular buffer in DRAM */ 151 /* Tell device where to find RBD circular buffer in DRAM */
152 il_wr(il, FH_RSCSR_CHNL0_RBDCB_BASE_REG, 152 il_wr(il, FH49_RSCSR_CHNL0_RBDCB_BASE_REG,
153 (u32)(rxq->bd_dma >> 8)); 153 (u32)(rxq->bd_dma >> 8));
154 154
155 /* Tell device where in DRAM to update its Rx status */ 155 /* Tell device where in DRAM to update its Rx status */
156 il_wr(il, FH_RSCSR_CHNL0_STTS_WPTR_REG, 156 il_wr(il, FH49_RSCSR_CHNL0_STTS_WPTR_REG,
157 rxq->rb_stts_dma >> 4); 157 rxq->rb_stts_dma >> 4);
158 158
159 /* Enable Rx DMA 159 /* Enable Rx DMA
@@ -162,13 +162,13 @@ int il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq)
162 * RB timeout 0x10 162 * RB timeout 0x10
163 * 256 RBDs 163 * 256 RBDs
164 */ 164 */
165 il_wr(il, FH_MEM_RCSR_CHNL0_CONFIG_REG, 165 il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG,
166 FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | 166 FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL |
167 FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | 167 FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
168 FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | 168 FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK |
169 rb_size| 169 rb_size|
170 (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| 170 (rb_timeout << FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)|
171 (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); 171 (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
172 172
173 /* Set interrupt coalescing timer to default (2048 usecs) */ 173 /* Set interrupt coalescing timer to default (2048 usecs) */
174 il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF); 174 il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF);
@@ -443,9 +443,9 @@ int il4965_rxq_stop(struct il_priv *il)
443{ 443{
444 444
445 /* stop Rx DMA */ 445 /* stop Rx DMA */
446 il_wr(il, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); 446 il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG, 0);
447 il_poll_bit(il, FH_MEM_RSSR_RX_STATUS_REG, 447 il_poll_bit(il, FH49_MEM_RSSR_RX_STATUS_REG,
448 FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000); 448 FH49_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000);
449 449
450 return 0; 450 return 0;
451} 451}
@@ -1180,15 +1180,15 @@ u8 il4965_toggle_tx_ant(struct il_priv *il, u8 ant, u8 valid)
1180static const char *il4965_get_fh_string(int cmd) 1180static const char *il4965_get_fh_string(int cmd)
1181{ 1181{
1182 switch (cmd) { 1182 switch (cmd) {
1183 IL_CMD(FH_RSCSR_CHNL0_STTS_WPTR_REG); 1183 IL_CMD(FH49_RSCSR_CHNL0_STTS_WPTR_REG);
1184 IL_CMD(FH_RSCSR_CHNL0_RBDCB_BASE_REG); 1184 IL_CMD(FH49_RSCSR_CHNL0_RBDCB_BASE_REG);
1185 IL_CMD(FH_RSCSR_CHNL0_WPTR); 1185 IL_CMD(FH49_RSCSR_CHNL0_WPTR);
1186 IL_CMD(FH_MEM_RCSR_CHNL0_CONFIG_REG); 1186 IL_CMD(FH49_MEM_RCSR_CHNL0_CONFIG_REG);
1187 IL_CMD(FH_MEM_RSSR_SHARED_CTRL_REG); 1187 IL_CMD(FH49_MEM_RSSR_SHARED_CTRL_REG);
1188 IL_CMD(FH_MEM_RSSR_RX_STATUS_REG); 1188 IL_CMD(FH49_MEM_RSSR_RX_STATUS_REG);
1189 IL_CMD(FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV); 1189 IL_CMD(FH49_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV);
1190 IL_CMD(FH_TSSR_TX_STATUS_REG); 1190 IL_CMD(FH49_TSSR_TX_STATUS_REG);
1191 IL_CMD(FH_TSSR_TX_ERROR_REG); 1191 IL_CMD(FH49_TSSR_TX_ERROR_REG);
1192 default: 1192 default:
1193 return "UNKNOWN"; 1193 return "UNKNOWN";
1194 } 1194 }
@@ -1202,15 +1202,15 @@ int il4965_dump_fh(struct il_priv *il, char **buf, bool display)
1202 size_t bufsz = 0; 1202 size_t bufsz = 0;
1203#endif 1203#endif
1204 static const u32 fh_tbl[] = { 1204 static const u32 fh_tbl[] = {
1205 FH_RSCSR_CHNL0_STTS_WPTR_REG, 1205 FH49_RSCSR_CHNL0_STTS_WPTR_REG,
1206 FH_RSCSR_CHNL0_RBDCB_BASE_REG, 1206 FH49_RSCSR_CHNL0_RBDCB_BASE_REG,
1207 FH_RSCSR_CHNL0_WPTR, 1207 FH49_RSCSR_CHNL0_WPTR,
1208 FH_MEM_RCSR_CHNL0_CONFIG_REG, 1208 FH49_MEM_RCSR_CHNL0_CONFIG_REG,
1209 FH_MEM_RSSR_SHARED_CTRL_REG, 1209 FH49_MEM_RSSR_SHARED_CTRL_REG,
1210 FH_MEM_RSSR_RX_STATUS_REG, 1210 FH49_MEM_RSSR_RX_STATUS_REG,
1211 FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV, 1211 FH49_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV,
1212 FH_TSSR_TX_STATUS_REG, 1212 FH49_TSSR_TX_STATUS_REG,
1213 FH_TSSR_TX_ERROR_REG 1213 FH49_TSSR_TX_ERROR_REG
1214 }; 1214 };
1215#ifdef CONFIG_IWLEGACY_DEBUG 1215#ifdef CONFIG_IWLEGACY_DEBUG
1216 if (display) { 1216 if (display) {
@@ -2010,7 +2010,7 @@ int il4965_txq_ctx_alloc(struct il_priv *il)
2010 il4965_txq_set_sched(il, 0); 2010 il4965_txq_set_sched(il, 0);
2011 2011
2012 /* Tell NIC where to find the "keep warm" buffer */ 2012 /* Tell NIC where to find the "keep warm" buffer */
2013 il_wr(il, FH_KW_MEM_ADDR_REG, il->kw.dma >> 4); 2013 il_wr(il, FH49_KW_MEM_ADDR_REG, il->kw.dma >> 4);
2014 2014
2015 spin_unlock_irqrestore(&il->lock, flags); 2015 spin_unlock_irqrestore(&il->lock, flags);
2016 2016
@@ -2049,7 +2049,7 @@ void il4965_txq_ctx_reset(struct il_priv *il)
2049 il4965_txq_set_sched(il, 0); 2049 il4965_txq_set_sched(il, 0);
2050 2050
2051 /* Tell NIC where to find the "keep warm" buffer */ 2051 /* Tell NIC where to find the "keep warm" buffer */
2052 il_wr(il, FH_KW_MEM_ADDR_REG, il->kw.dma >> 4); 2052 il_wr(il, FH49_KW_MEM_ADDR_REG, il->kw.dma >> 4);
2053 2053
2054 spin_unlock_irqrestore(&il->lock, flags); 2054 spin_unlock_irqrestore(&il->lock, flags);
2055 2055
@@ -2078,14 +2078,14 @@ void il4965_txq_ctx_stop(struct il_priv *il)
2078 /* Stop each Tx DMA channel, and wait for it to be idle */ 2078 /* Stop each Tx DMA channel, and wait for it to be idle */
2079 for (ch = 0; ch < il->hw_params.dma_chnl_num; ch++) { 2079 for (ch = 0; ch < il->hw_params.dma_chnl_num; ch++) {
2080 il_wr(il, 2080 il_wr(il,
2081 FH_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0); 2081 FH49_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0);
2082 if (il_poll_bit(il, FH_TSSR_TX_STATUS_REG, 2082 if (il_poll_bit(il, FH49_TSSR_TX_STATUS_REG,
2083 FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 2083 FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch),
2084 1000)) 2084 1000))
2085 IL_ERR("Failing on timeout while stopping" 2085 IL_ERR("Failing on timeout while stopping"
2086 " DMA channel %d [0x%08x]", ch, 2086 " DMA channel %d [0x%08x]", ch,
2087 il_rd(il, 2087 il_rd(il,
2088 FH_TSSR_TX_STATUS_REG)); 2088 FH49_TSSR_TX_STATUS_REG));
2089 } 2089 }
2090 spin_unlock_irqrestore(&il->lock, flags); 2090 spin_unlock_irqrestore(&il->lock, flags);
2091 2091
@@ -3743,7 +3743,7 @@ int il4965_hw_tx_queue_init(struct il_priv *il,
3743 int txq_id = txq->q.id; 3743 int txq_id = txq->q.id;
3744 3744
3745 /* Circular buffer (TFD queue in DRAM) physical base address */ 3745 /* Circular buffer (TFD queue in DRAM) physical base address */
3746 il_wr(il, FH_MEM_CBBC_QUEUE(txq_id), 3746 il_wr(il, FH49_MEM_CBBC_QUEUE(txq_id),
3747 txq->q.dma_addr >> 8); 3747 txq->q.dma_addr >> 8);
3748 3748
3749 return 0; 3749 return 0;
@@ -4262,7 +4262,7 @@ static void il4965_irq_tasklet(struct il_priv *il)
4262 if (inta & ~(il->inta_mask)) { 4262 if (inta & ~(il->inta_mask)) {
4263 IL_WARN("Disabled INTA bits 0x%08x were pending\n", 4263 IL_WARN("Disabled INTA bits 0x%08x were pending\n",
4264 inta & ~il->inta_mask); 4264 inta & ~il->inta_mask);
4265 IL_WARN(" with FH_INT = 0x%08x\n", inta_fh); 4265 IL_WARN(" with FH49_INT = 0x%08x\n", inta_fh);
4266 } 4266 }
4267 4267
4268 /* Re-enable all interrupts */ 4268 /* Re-enable all interrupts */
@@ -4798,7 +4798,7 @@ static const char * const desc_lookup_text[] = {
4798 "HW_ERROR_TEMPERATURE", 4798 "HW_ERROR_TEMPERATURE",
4799 "ILLEGAL_CHAN_FREQ", 4799 "ILLEGAL_CHAN_FREQ",
4800 "VCC_NOT_STBL", 4800 "VCC_NOT_STBL",
4801 "FH_ERROR", 4801 "FH49_ERROR",
4802 "NMI_INTERRUPT_HOST", 4802 "NMI_INTERRUPT_HOST",
4803 "NMI_INTERRUPT_ACTION_PT", 4803 "NMI_INTERRUPT_ACTION_PT",
4804 "NMI_INTERRUPT_UNKNOWN", 4804 "NMI_INTERRUPT_UNKNOWN",
@@ -4969,14 +4969,14 @@ static int il4965_alive_notify(struct il_priv *il)
4969 /* Enable DMA channel */ 4969 /* Enable DMA channel */
4970 for (chan = 0; chan < FH49_TCSR_CHNL_NUM ; chan++) 4970 for (chan = 0; chan < FH49_TCSR_CHNL_NUM ; chan++)
4971 il_wr(il, 4971 il_wr(il,
4972 FH_TCSR_CHNL_TX_CONFIG_REG(chan), 4972 FH49_TCSR_CHNL_TX_CONFIG_REG(chan),
4973 FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE | 4973 FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE |
4974 FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE); 4974 FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE);
4975 4975
4976 /* Update FH chicken bits */ 4976 /* Update FH chicken bits */
4977 reg_val = il_rd(il, FH_TX_CHICKEN_BITS_REG); 4977 reg_val = il_rd(il, FH49_TX_CHICKEN_BITS_REG);
4978 il_wr(il, FH_TX_CHICKEN_BITS_REG, 4978 il_wr(il, FH49_TX_CHICKEN_BITS_REG,
4979 reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); 4979 reg_val | FH49_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN);
4980 4980
4981 /* Disable chain mode for all queues */ 4981 /* Disable chain mode for all queues */
4982 il_wr_prph(il, IL49_SCD_QUEUECHAIN_SEL, 0); 4982 il_wr_prph(il, IL49_SCD_QUEUECHAIN_SEL, 0);
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 4b977177d8b6..cbbb2c03f51b 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -630,7 +630,7 @@ static int il4965_hw_set_hw_params(struct il_priv *il)
630 il->hw_params.max_bsm_size = BSM_SRAM_SIZE; 630 il->hw_params.max_bsm_size = BSM_SRAM_SIZE;
631 il->hw_params.ht40_channel = BIT(IEEE80211_BAND_5GHZ); 631 il->hw_params.ht40_channel = BIT(IEEE80211_BAND_5GHZ);
632 632
633 il->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; 633 il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR;
634 634
635 il->hw_params.tx_chains_num = il4965_num_of_ant(il->cfg->valid_tx_ant); 635 il->hw_params.tx_chains_num = il4965_num_of_ant(il->cfg->valid_tx_ant);
636 il->hw_params.rx_chains_num = il4965_num_of_ant(il->cfg->valid_rx_ant); 636 il->hw_params.rx_chains_num = il4965_num_of_ant(il->cfg->valid_rx_ant);
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 8ae4e3f667eb..be057aa511b6 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -2835,7 +2835,7 @@ struct il_tfd_tb {
2835 * contiguous 256 TFDs x 128 bytes-per-TFD = 32 KBytes 2835 * contiguous 256 TFDs x 128 bytes-per-TFD = 32 KBytes
2836 * 2836 *
2837 * Driver must indicate the physical address of the base of each 2837 * Driver must indicate the physical address of the base of each
2838 * circular buffer via the FH_MEM_CBBC_QUEUE registers. 2838 * circular buffer via the FH49_MEM_CBBC_QUEUE registers.
2839 * 2839 *
2840 * Each TFD contains pointer/size information for up to 20 data buffers 2840 * Each TFD contains pointer/size information for up to 20 data buffers
2841 * in host DRAM. These buffers collectively contain the (one) frame described 2841 * in host DRAM. These buffers collectively contain the (one) frame described
diff --git a/drivers/net/wireless/iwlegacy/iwl-fh.h b/drivers/net/wireless/iwlegacy/iwl-fh.h
index 7846baeef585..ac7c21283205 100644
--- a/drivers/net/wireless/iwlegacy/iwl-fh.h
+++ b/drivers/net/wireless/iwlegacy/iwl-fh.h
@@ -71,8 +71,8 @@
71 * This I/O area is directly read/writable by driver (e.g. Linux uses writel()) 71 * This I/O area is directly read/writable by driver (e.g. Linux uses writel())
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 FH49_MEM_LOWER_BOUND (0x1000)
75#define FH_MEM_UPPER_BOUND (0x2000) 75#define FH49_MEM_UPPER_BOUND (0x2000)
76 76
77/** 77/**
78 * Keep-Warm (KW) buffer base address. 78 * Keep-Warm (KW) buffer base address.
@@ -83,7 +83,7 @@
83 * from going into a power-savings mode that would cause higher DRAM latency, 83 * from going into a power-savings mode that would cause higher DRAM latency,
84 * and possible data over/under-runs, before all Tx/Rx is complete. 84 * and possible data over/under-runs, before all Tx/Rx is complete.
85 * 85 *
86 * Driver loads FH_KW_MEM_ADDR_REG with the physical address (bits 35:4) 86 * Driver loads FH49_KW_MEM_ADDR_REG with the physical address (bits 35:4)
87 * of the buffer, which must be 4K aligned. Once this is set up, the 4965 87 * of the buffer, which must be 4K aligned. Once this is set up, the 4965
88 * automatically invokes keep-warm accesses when normal accesses might not 88 * automatically invokes keep-warm accesses when normal accesses might not
89 * be sufficient to maintain fast DRAM response. 89 * be sufficient to maintain fast DRAM response.
@@ -91,7 +91,7 @@
91 * Bit fields: 91 * Bit fields:
92 * 31-0: Keep-warm buffer physical base address [35:4], must be 4K aligned 92 * 31-0: Keep-warm buffer physical base address [35:4], must be 4K aligned
93 */ 93 */
94#define FH_KW_MEM_ADDR_REG (FH_MEM_LOWER_BOUND + 0x97C) 94#define FH49_KW_MEM_ADDR_REG (FH49_MEM_LOWER_BOUND + 0x97C)
95 95
96 96
97/** 97/**
@@ -106,11 +106,11 @@
106 * Bit fields in each pointer register: 106 * Bit fields in each pointer register:
107 * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned 107 * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned
108 */ 108 */
109#define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) 109#define FH49_MEM_CBBC_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x9D0)
110#define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) 110#define FH49_MEM_CBBC_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xA10)
111 111
112/* Find TFD CB base pointer for given queue (range 0-15). */ 112/* Find TFD CB base pointer for given queue (range 0-15). */
113#define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) 113#define FH49_MEM_CBBC_QUEUE(x) (FH49_MEM_CBBC_LOWER_BOUND + (x) * 0x4)
114 114
115 115
116/** 116/**
@@ -132,18 +132,18 @@
132 * Each entry (1 dword) points to a receive buffer (RB) of consistent size 132 * Each entry (1 dword) points to a receive buffer (RB) of consistent size
133 * (typically 4K, although 8K or 16K are also selectable by driver). 133 * (typically 4K, although 8K or 16K are also selectable by driver).
134 * Driver sets up RB size and number of RBDs in the CB via Rx config 134 * Driver sets up RB size and number of RBDs in the CB via Rx config
135 * register FH_MEM_RCSR_CHNL0_CONFIG_REG. 135 * register FH49_MEM_RCSR_CHNL0_CONFIG_REG.
136 * 136 *
137 * Bit fields within one RBD: 137 * Bit fields within one RBD:
138 * 27-0: Receive Buffer physical address bits [35:8], 256-byte aligned 138 * 27-0: Receive Buffer physical address bits [35:8], 256-byte aligned
139 * 139 *
140 * Driver sets physical address [35:8] of base of RBD circular buffer 140 * Driver sets physical address [35:8] of base of RBD circular buffer
141 * into FH_RSCSR_CHNL0_RBDCB_BASE_REG [27:0]. 141 * into FH49_RSCSR_CHNL0_RBDCB_BASE_REG [27:0].
142 * 142 *
143 * 2) Rx status buffer, 8 bytes, in which 4965 indicates which Rx Buffers 143 * 2) Rx status buffer, 8 bytes, in which 4965 indicates which Rx Buffers
144 * (RBs) have been filled, via a "write pointer", actually the idx of 144 * (RBs) have been filled, via a "write pointer", actually the idx of
145 * the RB's corresponding RBD within the circular buffer. Driver sets 145 * the RB's corresponding RBD within the circular buffer. Driver sets
146 * physical address [35:4] into FH_RSCSR_CHNL0_STTS_WPTR_REG [31:0]. 146 * physical address [35:4] into FH49_RSCSR_CHNL0_STTS_WPTR_REG [31:0].
147 * 147 *
148 * Bit fields in lower dword of Rx status buffer (upper dword not used 148 * Bit fields in lower dword of Rx status buffer (upper dword not used
149 * by driver; see struct il4965_shared, val0): 149 * by driver; see struct il4965_shared, val0):
@@ -154,7 +154,7 @@
154 * As the driver prepares Receive Buffers (RBs) for 4965 to fill, driver must 154 * As the driver prepares Receive Buffers (RBs) for 4965 to fill, driver must
155 * enter pointers to these RBs into contiguous RBD circular buffer entries, 155 * enter pointers to these RBs into contiguous RBD circular buffer entries,
156 * and update the 4965's "write" idx register, 156 * and update the 4965's "write" idx register,
157 * FH_RSCSR_CHNL0_RBDCB_WPTR_REG. 157 * FH49_RSCSR_CHNL0_RBDCB_WPTR_REG.
158 * 158 *
159 * This "write" idx corresponds to the *next* RBD that the driver will make 159 * This "write" idx corresponds to the *next* RBD that the driver will make
160 * available, i.e. one RBD past the tail of the ready-to-fill RBDs within 160 * available, i.e. one RBD past the tail of the ready-to-fill RBDs within
@@ -182,23 +182,23 @@
182 * and "read" idxes; that is, make sure that there are no more than 254 182 * and "read" idxes; that is, make sure that there are no more than 254
183 * buffers waiting to be filled. 183 * buffers waiting to be filled.
184 */ 184 */
185#define FH_MEM_RSCSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBC0) 185#define FH49_MEM_RSCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xBC0)
186#define FH_MEM_RSCSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) 186#define FH49_MEM_RSCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xC00)
187#define FH_MEM_RSCSR_CHNL0 (FH_MEM_RSCSR_LOWER_BOUND) 187#define FH49_MEM_RSCSR_CHNL0 (FH49_MEM_RSCSR_LOWER_BOUND)
188 188
189/** 189/**
190 * Physical base address of 8-byte Rx Status buffer. 190 * Physical base address of 8-byte Rx Status buffer.
191 * Bit fields: 191 * Bit fields:
192 * 31-0: Rx status buffer physical base address [35:4], must 16-byte aligned. 192 * 31-0: Rx status buffer physical base address [35:4], must 16-byte aligned.
193 */ 193 */
194#define FH_RSCSR_CHNL0_STTS_WPTR_REG (FH_MEM_RSCSR_CHNL0) 194#define FH49_RSCSR_CHNL0_STTS_WPTR_REG (FH49_MEM_RSCSR_CHNL0)
195 195
196/** 196/**
197 * Physical base address of Rx Buffer Descriptor Circular Buffer. 197 * Physical base address of Rx Buffer Descriptor Circular Buffer.
198 * Bit fields: 198 * Bit fields:
199 * 27-0: RBD CD physical base address [35:8], must be 256-byte aligned. 199 * 27-0: RBD CD physical base address [35:8], must be 256-byte aligned.
200 */ 200 */
201#define FH_RSCSR_CHNL0_RBDCB_BASE_REG (FH_MEM_RSCSR_CHNL0 + 0x004) 201#define FH49_RSCSR_CHNL0_RBDCB_BASE_REG (FH49_MEM_RSCSR_CHNL0 + 0x004)
202 202
203/** 203/**
204 * Rx write pointer (idx, really!). 204 * Rx write pointer (idx, really!).
@@ -206,20 +206,20 @@
206 * 11-0: Index of driver's most recent prepared-to-be-filled RBD, + 1. 206 * 11-0: Index of driver's most recent prepared-to-be-filled RBD, + 1.
207 * NOTE: For 256-entry circular buffer, use only bits [7:0]. 207 * NOTE: For 256-entry circular buffer, use only bits [7:0].
208 */ 208 */
209#define FH_RSCSR_CHNL0_RBDCB_WPTR_REG (FH_MEM_RSCSR_CHNL0 + 0x008) 209#define FH49_RSCSR_CHNL0_RBDCB_WPTR_REG (FH49_MEM_RSCSR_CHNL0 + 0x008)
210#define FH_RSCSR_CHNL0_WPTR (FH_RSCSR_CHNL0_RBDCB_WPTR_REG) 210#define FH49_RSCSR_CHNL0_WPTR (FH49_RSCSR_CHNL0_RBDCB_WPTR_REG)
211 211
212 212
213/** 213/**
214 * Rx Config/Status Registers (RCSR) 214 * Rx Config/Status Registers (RCSR)
215 * Rx Config Reg for channel 0 (only channel used) 215 * Rx Config Reg for channel 0 (only channel used)
216 * 216 *
217 * Driver must initialize FH_MEM_RCSR_CHNL0_CONFIG_REG as follows for 217 * Driver must initialize FH49_MEM_RCSR_CHNL0_CONFIG_REG as follows for
218 * normal operation (see bit fields). 218 * normal operation (see bit fields).
219 * 219 *
220 * Clearing FH_MEM_RCSR_CHNL0_CONFIG_REG to 0 turns off Rx DMA. 220 * Clearing FH49_MEM_RCSR_CHNL0_CONFIG_REG to 0 turns off Rx DMA.
221 * Driver should poll FH_MEM_RSSR_RX_STATUS_REG for 221 * Driver should poll FH49_MEM_RSSR_RX_STATUS_REG for
222 * FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (bit 24) before continuing. 222 * FH49_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (bit 24) before continuing.
223 * 223 *
224 * Bit fields: 224 * Bit fields:
225 * 31-30: Rx DMA channel enable: '00' off/pause, '01' pause at end of frame, 225 * 31-30: Rx DMA channel enable: '00' off/pause, '01' pause at end of frame,
@@ -236,67 +236,67 @@
236 * typical value 0x10 (about 1/2 msec) 236 * typical value 0x10 (about 1/2 msec)
237 * 3- 0: reserved 237 * 3- 0: reserved
238 */ 238 */
239#define FH_MEM_RCSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) 239#define FH49_MEM_RCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xC00)
240#define FH_MEM_RCSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xCC0) 240#define FH49_MEM_RCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xCC0)
241#define FH_MEM_RCSR_CHNL0 (FH_MEM_RCSR_LOWER_BOUND) 241#define FH49_MEM_RCSR_CHNL0 (FH49_MEM_RCSR_LOWER_BOUND)
242 242
243#define FH_MEM_RCSR_CHNL0_CONFIG_REG (FH_MEM_RCSR_CHNL0) 243#define FH49_MEM_RCSR_CHNL0_CONFIG_REG (FH49_MEM_RCSR_CHNL0)
244 244
245#define FH_RCSR_CHNL0_RX_CONFIG_RB_TIMEOUT_MSK (0x00000FF0) /* bits 4-11 */ 245#define FH49_RCSR_CHNL0_RX_CONFIG_RB_TIMEOUT_MSK (0x00000FF0) /* bits 4-11 */
246#define FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_MSK (0x00001000) /* bits 12 */ 246#define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_MSK (0x00001000) /* bits 12 */
247#define FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK (0x00008000) /* bit 15 */ 247#define FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK (0x00008000) /* bit 15 */
248#define FH_RCSR_CHNL0_RX_CONFIG_RB_SIZE_MSK (0x00030000) /* bits 16-17 */ 248#define FH49_RCSR_CHNL0_RX_CONFIG_RB_SIZE_MSK (0x00030000) /* bits 16-17 */
249#define FH_RCSR_CHNL0_RX_CONFIG_RBDBC_SIZE_MSK (0x00F00000) /* bits 20-23 */ 249#define FH49_RCSR_CHNL0_RX_CONFIG_RBDBC_SIZE_MSK (0x00F00000) /* bits 20-23 */
250#define FH_RCSR_CHNL0_RX_CONFIG_DMA_CHNL_EN_MSK (0xC0000000) /* bits 30-31*/ 250#define FH49_RCSR_CHNL0_RX_CONFIG_DMA_CHNL_EN_MSK (0xC0000000) /* bits 30-31*/
251 251
252#define FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS (20) 252#define FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS (20)
253#define FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS (4) 253#define FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS (4)
254#define RX_RB_TIMEOUT (0x10) 254#define RX_RB_TIMEOUT (0x10)
255 255
256#define FH_RCSR_RX_CONFIG_CHNL_EN_PAUSE_VAL (0x00000000) 256#define FH49_RCSR_RX_CONFIG_CHNL_EN_PAUSE_VAL (0x00000000)
257#define FH_RCSR_RX_CONFIG_CHNL_EN_PAUSE_EOF_VAL (0x40000000) 257#define FH49_RCSR_RX_CONFIG_CHNL_EN_PAUSE_EOF_VAL (0x40000000)
258#define FH_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL (0x80000000) 258#define FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL (0x80000000)
259 259
260#define FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K (0x00000000) 260#define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K (0x00000000)
261#define FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K (0x00010000) 261#define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K (0x00010000)
262#define FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_12K (0x00020000) 262#define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_12K (0x00020000)
263#define FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_16K (0x00030000) 263#define FH49_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_16K (0x00030000)
264 264
265#define FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY (0x00000004) 265#define FH49_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY (0x00000004)
266#define FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_NO_INT_VAL (0x00000000) 266#define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_NO_INT_VAL (0x00000000)
267#define FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL (0x00001000) 267#define FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL (0x00001000)
268 268
269/** 269/**
270 * Rx Shared Status Registers (RSSR) 270 * Rx Shared Status Registers (RSSR)
271 * 271 *
272 * After stopping Rx DMA channel (writing 0 to 272 * After stopping Rx DMA channel (writing 0 to
273 * FH_MEM_RCSR_CHNL0_CONFIG_REG), driver must poll 273 * FH49_MEM_RCSR_CHNL0_CONFIG_REG), driver must poll
274 * FH_MEM_RSSR_RX_STATUS_REG until Rx channel is idle. 274 * FH49_MEM_RSSR_RX_STATUS_REG until Rx channel is idle.
275 * 275 *
276 * Bit fields: 276 * Bit fields:
277 * 24: 1 = Channel 0 is idle 277 * 24: 1 = Channel 0 is idle
278 * 278 *
279 * FH_MEM_RSSR_SHARED_CTRL_REG and FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV 279 * FH49_MEM_RSSR_SHARED_CTRL_REG and FH49_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV
280 * contain default values that should not be altered by the driver. 280 * contain default values that should not be altered by the driver.
281 */ 281 */
282#define FH_MEM_RSSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xC40) 282#define FH49_MEM_RSSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xC40)
283#define FH_MEM_RSSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xD00) 283#define FH49_MEM_RSSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xD00)
284 284
285#define FH_MEM_RSSR_SHARED_CTRL_REG (FH_MEM_RSSR_LOWER_BOUND) 285#define FH49_MEM_RSSR_SHARED_CTRL_REG (FH49_MEM_RSSR_LOWER_BOUND)
286#define FH_MEM_RSSR_RX_STATUS_REG (FH_MEM_RSSR_LOWER_BOUND + 0x004) 286#define FH49_MEM_RSSR_RX_STATUS_REG (FH49_MEM_RSSR_LOWER_BOUND + 0x004)
287#define FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV\ 287#define FH49_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV\
288 (FH_MEM_RSSR_LOWER_BOUND + 0x008) 288 (FH49_MEM_RSSR_LOWER_BOUND + 0x008)
289 289
290#define FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) 290#define FH49_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
291 291
292#define FH_MEM_TFDIB_REG1_ADDR_BITSHIFT 28 292#define FH49_MEM_TFDIB_REG1_ADDR_BITSHIFT 28
293 293
294/* TFDB Area - TFDs buffer table */ 294/* TFDB Area - TFDs buffer table */
295#define FH_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF) 295#define FH49_MEM_TFDIB_DRAM_ADDR_LSB_MSK (0xFFFFFFFF)
296#define FH_TFDIB_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x900) 296#define FH49_TFDIB_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x900)
297#define FH_TFDIB_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0x958) 297#define FH49_TFDIB_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0x958)
298#define FH_TFDIB_CTRL0_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl)) 298#define FH49_TFDIB_CTRL0_REG(_chnl) (FH49_TFDIB_LOWER_BOUND + 0x8 * (_chnl))
299#define FH_TFDIB_CTRL1_REG(_chnl) (FH_TFDIB_LOWER_BOUND + 0x8 * (_chnl) + 0x4) 299#define FH49_TFDIB_CTRL1_REG(_chnl) (FH49_TFDIB_LOWER_BOUND + 0x8 * (_chnl) + 0x4)
300 300
301/** 301/**
302 * Transmit DMA Channel Control/Status Registers (TCSR) 302 * Transmit DMA Channel Control/Status Registers (TCSR)
@@ -306,10 +306,10 @@
306 * which feed the DMA/FIFO channels); config regs are separated by 0x20 bytes. 306 * which feed the DMA/FIFO channels); config regs are separated by 0x20 bytes.
307 * 307 *
308 * To use a Tx DMA channel, driver must initialize its 308 * To use a Tx DMA channel, driver must initialize its
309 * FH_TCSR_CHNL_TX_CONFIG_REG(chnl) with: 309 * FH49_TCSR_CHNL_TX_CONFIG_REG(chnl) with:
310 * 310 *
311 * FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE | 311 * FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE |
312 * FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL 312 * FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL
313 * 313 *
314 * All other bits should be 0. 314 * All other bits should be 0.
315 * 315 *
@@ -320,62 +320,62 @@
320 * 3: Enable internal DMA requests (1, normal operation), disable (0) 320 * 3: Enable internal DMA requests (1, normal operation), disable (0)
321 * 2- 0: Reserved, set to "0" 321 * 2- 0: Reserved, set to "0"
322 */ 322 */
323#define FH_TCSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xD00) 323#define FH49_TCSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xD00)
324#define FH_TCSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xE60) 324#define FH49_TCSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xE60)
325 325
326/* Find Control/Status reg for given Tx DMA/FIFO channel */ 326/* Find Control/Status reg for given Tx DMA/FIFO channel */
327#define FH49_TCSR_CHNL_NUM (7) 327#define FH49_TCSR_CHNL_NUM (7)
328#define FH50_TCSR_CHNL_NUM (8) 328#define FH50_TCSR_CHNL_NUM (8)
329 329
330/* TCSR: tx_config register values */ 330/* TCSR: tx_config register values */
331#define FH_TCSR_CHNL_TX_CONFIG_REG(_chnl) \ 331#define FH49_TCSR_CHNL_TX_CONFIG_REG(_chnl) \
332 (FH_TCSR_LOWER_BOUND + 0x20 * (_chnl)) 332 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl))
333#define FH_TCSR_CHNL_TX_CREDIT_REG(_chnl) \ 333#define FH49_TCSR_CHNL_TX_CREDIT_REG(_chnl) \
334 (FH_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x4) 334 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x4)
335#define FH_TCSR_CHNL_TX_BUF_STS_REG(_chnl) \ 335#define FH49_TCSR_CHNL_TX_BUF_STS_REG(_chnl) \
336 (FH_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x8) 336 (FH49_TCSR_LOWER_BOUND + 0x20 * (_chnl) + 0x8)
337 337
338#define FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000) 338#define FH49_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000)
339#define FH_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRV (0x00000001) 339#define FH49_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRV (0x00000001)
340 340
341#define FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE (0x00000000) 341#define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE (0x00000000)
342#define FH_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE (0x00000008) 342#define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE (0x00000008)
343 343
344#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_NOINT (0x00000000) 344#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_NOINT (0x00000000)
345#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_ENDTFD (0x00100000) 345#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_ENDTFD (0x00100000)
346#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000) 346#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000)
347 347
348#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000) 348#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000)
349#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_ENDTFD (0x00400000) 349#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_ENDTFD (0x00400000)
350#define FH_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_IFTFD (0x00800000) 350#define FH49_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_IFTFD (0x00800000)
351 351
352#define FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000) 352#define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000)
353#define FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE_EOF (0x40000000) 353#define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE_EOF (0x40000000)
354#define FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000) 354#define FH49_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000)
355 355
356#define FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_EMPTY (0x00000000) 356#define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_EMPTY (0x00000000)
357#define FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_WAIT (0x00002000) 357#define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_WAIT (0x00002000)
358#define FH_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00000003) 358#define FH49_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00000003)
359 359
360#define FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM (20) 360#define FH49_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_NUM (20)
361#define FH_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_IDX (12) 361#define FH49_TCSR_CHNL_TX_BUF_STS_REG_POS_TB_IDX (12)
362 362
363/** 363/**
364 * Tx Shared Status Registers (TSSR) 364 * Tx Shared Status Registers (TSSR)
365 * 365 *
366 * After stopping Tx DMA channel (writing 0 to 366 * After stopping Tx DMA channel (writing 0 to
367 * FH_TCSR_CHNL_TX_CONFIG_REG(chnl)), driver must poll 367 * FH49_TCSR_CHNL_TX_CONFIG_REG(chnl)), driver must poll
368 * FH_TSSR_TX_STATUS_REG until selected Tx channel is idle 368 * FH49_TSSR_TX_STATUS_REG until selected Tx channel is idle
369 * (channel's buffers empty | no pending requests). 369 * (channel's buffers empty | no pending requests).
370 * 370 *
371 * Bit fields: 371 * Bit fields:
372 * 31-24: 1 = Channel buffers empty (channel 7:0) 372 * 31-24: 1 = Channel buffers empty (channel 7:0)
373 * 23-16: 1 = No pending requests (channel 7:0) 373 * 23-16: 1 = No pending requests (channel 7:0)
374 */ 374 */
375#define FH_TSSR_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xEA0) 375#define FH49_TSSR_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0xEA0)
376#define FH_TSSR_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xEC0) 376#define FH49_TSSR_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0xEC0)
377 377
378#define FH_TSSR_TX_STATUS_REG (FH_TSSR_LOWER_BOUND + 0x010) 378#define FH49_TSSR_TX_STATUS_REG (FH49_TSSR_LOWER_BOUND + 0x010)
379 379
380/** 380/**
381 * Bit fields for TSSR(Tx Shared Status & Control) error status register: 381 * Bit fields for TSSR(Tx Shared Status & Control) error status register:
@@ -394,22 +394,22 @@
394 * synchronized to the TxFIFO status 394 * synchronized to the TxFIFO status
395 * uCode/driver must write "1" in order to clear this flag 395 * uCode/driver must write "1" in order to clear this flag
396 */ 396 */
397#define FH_TSSR_TX_ERROR_REG (FH_TSSR_LOWER_BOUND + 0x018) 397#define FH49_TSSR_TX_ERROR_REG (FH49_TSSR_LOWER_BOUND + 0x018)
398 398
399#define FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) ((1 << (_chnl)) << 16) 399#define FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_chnl) ((1 << (_chnl)) << 16)
400 400
401/* Tx service channels */ 401/* Tx service channels */
402#define FH_SRVC_CHNL (9) 402#define FH49_SRVC_CHNL (9)
403#define FH_SRVC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9C8) 403#define FH49_SRVC_LOWER_BOUND (FH49_MEM_LOWER_BOUND + 0x9C8)
404#define FH_SRVC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) 404#define FH49_SRVC_UPPER_BOUND (FH49_MEM_LOWER_BOUND + 0x9D0)
405#define FH_SRVC_CHNL_SRAM_ADDR_REG(_chnl) \ 405#define FH49_SRVC_CHNL_SRAM_ADDR_REG(_chnl) \
406 (FH_SRVC_LOWER_BOUND + ((_chnl) - 9) * 0x4) 406 (FH49_SRVC_LOWER_BOUND + ((_chnl) - 9) * 0x4)
407 407
408#define FH_TX_CHICKEN_BITS_REG (FH_MEM_LOWER_BOUND + 0xE98) 408#define FH49_TX_CHICKEN_BITS_REG (FH49_MEM_LOWER_BOUND + 0xE98)
409/* Instruct FH to increment the retry count of a packet when 409/* Instruct FH to increment the retry count of a packet when
410 * it is brought from the memory to TX-FIFO 410 * it is brought from the memory to TX-FIFO
411 */ 411 */
412#define FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002) 412#define FH49_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN (0x00000002)
413 413
414/* Keep Warm Size */ 414/* Keep Warm Size */
415#define IL_KW_SIZE 0x1000 /* 4k */ 415#define IL_KW_SIZE 0x1000 /* 4k */