36 static void ar9003_hw_init_mode_regs(
struct ath_hw *
ah)
38 #define AR9462_BB_CTX_COEFJ(x) \
39 ar9462_##x##_baseband_core_txfir_coeff_japan_2484
41 #define AR9462_BBC_TXIFR_COEFFJ \
42 ar9462_2p0_baseband_core_txfir_coeff_japan_2484
53 ar9331_1p1_baseband_core);
55 ar9331_1p1_baseband_postamble);
59 ar9331_1p1_radio_core);
63 ar9331_1p1_soc_preamble);
65 ar9331_1p1_soc_postamble);
69 ar9331_common_rx_gain_1p1);
71 ar9331_modes_lowest_ob_db_tx_gain_1p1);
91 ar9331_1p2_baseband_postamble);
95 ar9331_1p2_radio_core);
119 ar9340_1p0_mac_core);
125 ar9340_1p0_baseband_core);
127 ar9340_1p0_baseband_postamble);
131 ar9340_1p0_radio_core);
133 ar9340_1p0_radio_postamble);
137 ar9340_1p0_soc_preamble);
145 ar9340Modes_high_ob_db_tx_gain_table_1p0);
152 ar9340_1p0_radio_core_40M);
156 ar9485_1_1_mac_core);
163 ar9485_1_1_baseband_core);
165 ar9485_1_1_baseband_postamble);
169 ar9485_1_1_radio_core);
171 ar9485_1_1_radio_postamble);
175 ar9485_1_1_soc_preamble);
179 ar9485Common_wo_xlna_rx_gain_1_1);
188 ar9485_1_1_pcie_phy_clkreq_disable_L1);
193 ar9485_1_1_pcie_phy_clkreq_disable_L1);
198 ar9462_2p0_mac_postamble);
201 ar9462_2p0_baseband_core);
203 ar9462_2p0_baseband_postamble);
206 ar9462_2p0_radio_core);
208 ar9462_2p0_radio_postamble);
210 ar9462_2p0_radio_postamble_sys2ant);
213 ar9462_2p0_soc_preamble);
215 ar9462_2p0_soc_postamble);
218 ar9462_common_rx_gain_table_2p0);
222 ar9462_pciephy_pll_on_clkreq_disable_L1_2p0);
225 ar9462_pciephy_pll_on_clkreq_disable_L1_2p0);
229 ar9462_modes_fast_clock_2p0);
238 ar955x_1p0_mac_core);
240 ar955x_1p0_mac_postamble);
244 ar955x_1p0_baseband_core);
246 ar955x_1p0_baseband_postamble);
250 ar955x_1p0_radio_core);
252 ar955x_1p0_radio_postamble);
256 ar955x_1p0_soc_preamble);
258 ar955x_1p0_soc_postamble);
262 ar955x_1p0_common_wo_xlna_rx_gain_table);
264 ar955x_1p0_common_wo_xlna_rx_gain_bounds);
266 ar955x_1p0_modes_xpa_tx_gain_table);
270 ar955x_1p0_modes_fast_clock);
274 ar9580_1p0_mac_core);
280 ar9580_1p0_baseband_core);
282 ar9580_1p0_baseband_postamble);
286 ar9580_1p0_radio_core);
288 ar9580_1p0_radio_postamble);
292 ar9580_1p0_soc_preamble);
300 ar9580_1p0_low_ob_db_tx_gain_table);
306 ar9565_1p0_mac_core);
308 ar9565_1p0_mac_postamble);
311 ar9565_1p0_baseband_core);
313 ar9565_1p0_baseband_postamble);
316 ar9565_1p0_radio_core);
318 ar9565_1p0_radio_postamble);
321 ar9565_1p0_soc_preamble);
323 ar9565_1p0_soc_postamble);
326 ar9565_1p0_Common_rx_gain_table);
328 ar9565_1p0_Modes_lowest_ob_db_tx_gain_table);
331 ar9565_1p0_pciephy_pll_on_clkreq_disable_L1);
333 ar9565_1p0_pciephy_pll_on_clkreq_disable_L1);
336 ar9565_1p0_modes_fast_clock);
340 ar9300_2p2_mac_core);
342 ar9300_2p2_mac_postamble);
346 ar9300_2p2_baseband_core);
348 ar9300_2p2_baseband_postamble);
352 ar9300_2p2_radio_core);
354 ar9300_2p2_radio_postamble);
358 ar9300_2p2_soc_preamble);
360 ar9300_2p2_soc_postamble);
364 ar9300Common_rx_gain_table_2p2);
366 ar9300Modes_lowest_ob_db_tx_gain_table_2p2);
373 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2);
378 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2);
382 ar9300Modes_fast_clock_2p2);
386 static void ar9003_tx_gain_table_mode0(
struct ath_hw *ah)
393 ar9331_modes_lowest_ob_db_tx_gain_1p1);
396 ar9340Modes_lowest_ob_db_tx_gain_table_1p0);
402 ar955x_1p0_modes_xpa_tx_gain_table);
405 ar9580_1p0_lowest_ob_db_tx_gain_table);
408 ar9462_modes_low_ob_db_tx_gain_table_2p0);
411 ar9565_1p0_modes_low_ob_db_tx_gain_table);
414 ar9300Modes_lowest_ob_db_tx_gain_table_2p2);
417 static void ar9003_tx_gain_table_mode1(
struct ath_hw *ah)
421 ar9331_modes_high_ob_db_tx_gain_1p2);
424 ar9331_modes_high_ob_db_tx_gain_1p1);
427 ar9340Modes_high_ob_db_tx_gain_table_1p0);
436 ar955x_1p0_modes_no_xpa_tx_gain_table);
439 ar9462_modes_high_ob_db_tx_gain_table_2p0);
442 ar9565_1p0_modes_high_ob_db_tx_gain_table);
445 ar9300Modes_high_ob_db_tx_gain_table_2p2);
448 static void ar9003_tx_gain_table_mode2(
struct ath_hw *ah)
455 ar9331_modes_low_ob_db_tx_gain_1p1);
458 ar9340Modes_low_ob_db_tx_gain_table_1p0);
464 ar9580_1p0_low_ob_db_tx_gain_table);
467 ar9565_1p0_modes_low_ob_db_tx_gain_table);
470 ar9300Modes_low_ob_db_tx_gain_table_2p2);
473 static void ar9003_tx_gain_table_mode3(
struct ath_hw *ah)
480 ar9331_modes_high_power_tx_gain_1p1);
483 ar9340Modes_high_power_tx_gain_table_1p0);
486 ar9485Modes_high_power_tx_gain_1_1);
492 ar9565_1p0_modes_high_power_tx_gain_table);
495 ar9300Modes_high_power_tx_gain_table_2p2);
498 static void ar9003_tx_gain_table_mode4(
struct ath_hw *ah)
502 ar9340Modes_mixed_ob_db_tx_gain_table_1p0);
505 ar9580_1p0_mixed_ob_db_tx_gain_table);
508 static void ar9003_tx_gain_table_apply(
struct ath_hw *ah)
513 ar9003_tx_gain_table_mode0(ah);
516 ar9003_tx_gain_table_mode1(ah);
519 ar9003_tx_gain_table_mode2(ah);
522 ar9003_tx_gain_table_mode3(ah);
525 ar9003_tx_gain_table_mode4(ah);
530 static void ar9003_rx_gain_table_mode0(
struct ath_hw *ah)
537 ar9331_common_rx_gain_1p1);
540 ar9340Common_rx_gain_table_1p0);
543 ar9485Common_wo_xlna_rx_gain_1_1);
546 ar955x_1p0_common_rx_gain_table);
548 ar955x_1p0_common_rx_gain_bounds);
554 ar9462_common_rx_gain_table_2p0);
557 ar9300Common_rx_gain_table_2p2);
560 static void ar9003_rx_gain_table_mode1(
struct ath_hw *ah)
567 ar9331_common_wo_xlna_rx_gain_1p1);
573 ar9485Common_wo_xlna_rx_gain_1_1);
576 ar9462_common_wo_xlna_rx_gain_table_2p0);
579 ar955x_1p0_common_wo_xlna_rx_gain_table);
581 ar955x_1p0_common_wo_xlna_rx_gain_bounds);
587 ar9565_1p0_common_wo_xlna_rx_gain_table);
590 ar9300Common_wo_xlna_rx_gain_table_2p2);
593 static void ar9003_rx_gain_table_mode2(
struct ath_hw *ah)
597 ar9462_common_mixed_rx_gain_table_2p0);
600 static void ar9003_rx_gain_table_apply(
struct ath_hw *ah)
605 ar9003_rx_gain_table_mode0(ah);
608 ar9003_rx_gain_table_mode1(ah);
611 ar9003_rx_gain_table_mode2(ah);
617 static void ar9003_hw_init_mode_gain_regs(
struct ath_hw *ah)
619 ar9003_tx_gain_table_apply(ah);
620 ar9003_rx_gain_table_apply(ah);
632 static void ar9003_hw_configpcipowersave(
struct ath_hw *ah,
651 if (ah->
config.pcieSerDesWrite) {
658 for (i = 0; i < array->
ia_rows; i++) {