162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2008-2011 Atheros Communications Inc. 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 562306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 662306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 962306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1162306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1262306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1362306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1462306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#include "hw.h" 1862306a36Sopenharmony_ci#include "ar9003_mac.h" 1962306a36Sopenharmony_ci#include "ar9003_2p2_initvals.h" 2062306a36Sopenharmony_ci#include "ar9003_buffalo_initvals.h" 2162306a36Sopenharmony_ci#include "ar9485_initvals.h" 2262306a36Sopenharmony_ci#include "ar9340_initvals.h" 2362306a36Sopenharmony_ci#include "ar9330_1p1_initvals.h" 2462306a36Sopenharmony_ci#include "ar9330_1p2_initvals.h" 2562306a36Sopenharmony_ci#include "ar955x_1p0_initvals.h" 2662306a36Sopenharmony_ci#include "ar9580_1p0_initvals.h" 2762306a36Sopenharmony_ci#include "ar9462_2p0_initvals.h" 2862306a36Sopenharmony_ci#include "ar9462_2p1_initvals.h" 2962306a36Sopenharmony_ci#include "ar9565_1p0_initvals.h" 3062306a36Sopenharmony_ci#include "ar9565_1p1_initvals.h" 3162306a36Sopenharmony_ci#include "ar953x_initvals.h" 3262306a36Sopenharmony_ci#include "ar956x_initvals.h" 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* General hardware code for the AR9003 hadware family */ 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci/* 3762306a36Sopenharmony_ci * The AR9003 family uses a new INI format (pre, core, post 3862306a36Sopenharmony_ci * arrays per subsystem). This provides support for the 3962306a36Sopenharmony_ci * AR9003 2.2 chipsets. 4062306a36Sopenharmony_ci */ 4162306a36Sopenharmony_cistatic void ar9003_hw_init_mode_regs(struct ath_hw *ah) 4262306a36Sopenharmony_ci{ 4362306a36Sopenharmony_ci if (AR_SREV_9330_11(ah)) { 4462306a36Sopenharmony_ci /* mac */ 4562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 4662306a36Sopenharmony_ci ar9331_1p1_mac_core); 4762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 4862306a36Sopenharmony_ci ar9331_1p1_mac_postamble); 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci /* bb */ 5162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 5262306a36Sopenharmony_ci ar9331_1p1_baseband_core); 5362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 5462306a36Sopenharmony_ci ar9331_1p1_baseband_postamble); 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci /* radio */ 5762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 5862306a36Sopenharmony_ci ar9331_1p1_radio_core); 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci /* soc */ 6162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 6262306a36Sopenharmony_ci ar9331_1p1_soc_preamble); 6362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 6462306a36Sopenharmony_ci ar9331_1p1_soc_postamble); 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci /* rx/tx gain */ 6762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 6862306a36Sopenharmony_ci ar9331_common_rx_gain_1p1); 6962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 7062306a36Sopenharmony_ci ar9331_modes_lowest_ob_db_tx_gain_1p1); 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci /* Japan 2484 Mhz CCK */ 7362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 7462306a36Sopenharmony_ci ar9331_1p1_baseband_core_txfir_coeff_japan_2484); 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci /* additional clock settings */ 7762306a36Sopenharmony_ci if (ah->is_clk_25mhz) 7862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniAdditional, 7962306a36Sopenharmony_ci ar9331_1p1_xtal_25M); 8062306a36Sopenharmony_ci else 8162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniAdditional, 8262306a36Sopenharmony_ci ar9331_1p1_xtal_40M); 8362306a36Sopenharmony_ci } else if (AR_SREV_9330_12(ah)) { 8462306a36Sopenharmony_ci /* mac */ 8562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 8662306a36Sopenharmony_ci ar9331_1p2_mac_core); 8762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 8862306a36Sopenharmony_ci ar9331_1p2_mac_postamble); 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci /* bb */ 9162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 9262306a36Sopenharmony_ci ar9331_1p2_baseband_core); 9362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 9462306a36Sopenharmony_ci ar9331_1p2_baseband_postamble); 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci /* radio */ 9762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 9862306a36Sopenharmony_ci ar9331_1p2_radio_core); 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci /* soc */ 10162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 10262306a36Sopenharmony_ci ar9331_1p2_soc_preamble); 10362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 10462306a36Sopenharmony_ci ar9331_1p2_soc_postamble); 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci /* rx/tx gain */ 10762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 10862306a36Sopenharmony_ci ar9331_common_rx_gain_1p2); 10962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 11062306a36Sopenharmony_ci ar9331_modes_lowest_ob_db_tx_gain_1p2); 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci /* Japan 2484 Mhz CCK */ 11362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 11462306a36Sopenharmony_ci ar9331_1p2_baseband_core_txfir_coeff_japan_2484); 11562306a36Sopenharmony_ci 11662306a36Sopenharmony_ci /* additional clock settings */ 11762306a36Sopenharmony_ci if (ah->is_clk_25mhz) 11862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniAdditional, 11962306a36Sopenharmony_ci ar9331_1p2_xtal_25M); 12062306a36Sopenharmony_ci else 12162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniAdditional, 12262306a36Sopenharmony_ci ar9331_1p2_xtal_40M); 12362306a36Sopenharmony_ci } else if (AR_SREV_9340(ah)) { 12462306a36Sopenharmony_ci /* mac */ 12562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 12662306a36Sopenharmony_ci ar9340_1p0_mac_core); 12762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 12862306a36Sopenharmony_ci ar9340_1p0_mac_postamble); 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci /* bb */ 13162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 13262306a36Sopenharmony_ci ar9340_1p0_baseband_core); 13362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 13462306a36Sopenharmony_ci ar9340_1p0_baseband_postamble); 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci /* radio */ 13762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 13862306a36Sopenharmony_ci ar9340_1p0_radio_core); 13962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 14062306a36Sopenharmony_ci ar9340_1p0_radio_postamble); 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci /* soc */ 14362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 14462306a36Sopenharmony_ci ar9340_1p0_soc_preamble); 14562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 14662306a36Sopenharmony_ci ar9340_1p0_soc_postamble); 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci /* rx/tx gain */ 14962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 15062306a36Sopenharmony_ci ar9340Common_wo_xlna_rx_gain_table_1p0); 15162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 15262306a36Sopenharmony_ci ar9340Modes_high_ob_db_tx_gain_table_1p0); 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 15562306a36Sopenharmony_ci ar9340Modes_fast_clock_1p0); 15662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 15762306a36Sopenharmony_ci ar9340_1p0_baseband_core_txfir_coeff_japan_2484); 15862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_dfs, 15962306a36Sopenharmony_ci ar9340_1p0_baseband_postamble_dfs_channel); 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci if (!ah->is_clk_25mhz) 16262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniAdditional, 16362306a36Sopenharmony_ci ar9340_1p0_radio_core_40M); 16462306a36Sopenharmony_ci } else if (AR_SREV_9485_11_OR_LATER(ah)) { 16562306a36Sopenharmony_ci /* mac */ 16662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 16762306a36Sopenharmony_ci ar9485_1_1_mac_core); 16862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 16962306a36Sopenharmony_ci ar9485_1_1_mac_postamble); 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci /* bb */ 17262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], ar9485_1_1); 17362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 17462306a36Sopenharmony_ci ar9485_1_1_baseband_core); 17562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 17662306a36Sopenharmony_ci ar9485_1_1_baseband_postamble); 17762306a36Sopenharmony_ci 17862306a36Sopenharmony_ci /* radio */ 17962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 18062306a36Sopenharmony_ci ar9485_1_1_radio_core); 18162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 18262306a36Sopenharmony_ci ar9485_1_1_radio_postamble); 18362306a36Sopenharmony_ci 18462306a36Sopenharmony_ci /* soc */ 18562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 18662306a36Sopenharmony_ci ar9485_1_1_soc_preamble); 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci /* rx/tx gain */ 18962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 19062306a36Sopenharmony_ci ar9485Common_wo_xlna_rx_gain_1_1); 19162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 19262306a36Sopenharmony_ci ar9485_modes_lowest_ob_db_tx_gain_1_1); 19362306a36Sopenharmony_ci 19462306a36Sopenharmony_ci /* Japan 2484 Mhz CCK */ 19562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 19662306a36Sopenharmony_ci ar9485_1_1_baseband_core_txfir_coeff_japan_2484); 19762306a36Sopenharmony_ci 19862306a36Sopenharmony_ci if (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) { 19962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 20062306a36Sopenharmony_ci ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); 20162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 20262306a36Sopenharmony_ci ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); 20362306a36Sopenharmony_ci } else { 20462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 20562306a36Sopenharmony_ci ar9485_1_1_pcie_phy_clkreq_disable_L1); 20662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 20762306a36Sopenharmony_ci ar9485_1_1_pcie_phy_clkreq_disable_L1); 20862306a36Sopenharmony_ci } 20962306a36Sopenharmony_ci } else if (AR_SREV_9462_21(ah)) { 21062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 21162306a36Sopenharmony_ci ar9462_2p1_mac_core); 21262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 21362306a36Sopenharmony_ci ar9462_2p1_mac_postamble); 21462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 21562306a36Sopenharmony_ci ar9462_2p1_baseband_core); 21662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 21762306a36Sopenharmony_ci ar9462_2p1_baseband_postamble); 21862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 21962306a36Sopenharmony_ci ar9462_2p1_radio_core); 22062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 22162306a36Sopenharmony_ci ar9462_2p1_radio_postamble); 22262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant, 22362306a36Sopenharmony_ci ar9462_2p1_radio_postamble_sys2ant); 22462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 22562306a36Sopenharmony_ci ar9462_2p1_soc_preamble); 22662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 22762306a36Sopenharmony_ci ar9462_2p1_soc_postamble); 22862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 22962306a36Sopenharmony_ci ar9462_2p1_common_rx_gain); 23062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 23162306a36Sopenharmony_ci ar9462_2p1_modes_fast_clock); 23262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 23362306a36Sopenharmony_ci ar9462_2p1_baseband_core_txfir_coeff_japan_2484); 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ci /* Awake -> Sleep Setting */ 23662306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 23762306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) { 23862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 23962306a36Sopenharmony_ci ar9462_2p1_pciephy_clkreq_disable_L1); 24062306a36Sopenharmony_ci } 24162306a36Sopenharmony_ci 24262306a36Sopenharmony_ci /* Sleep -> Awake Setting */ 24362306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 24462306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) { 24562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 24662306a36Sopenharmony_ci ar9462_2p1_pciephy_clkreq_disable_L1); 24762306a36Sopenharmony_ci } 24862306a36Sopenharmony_ci } else if (AR_SREV_9462_20(ah)) { 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core); 25162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 25262306a36Sopenharmony_ci ar9462_2p0_mac_postamble); 25362306a36Sopenharmony_ci 25462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 25562306a36Sopenharmony_ci ar9462_2p0_baseband_core); 25662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 25762306a36Sopenharmony_ci ar9462_2p0_baseband_postamble); 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 26062306a36Sopenharmony_ci ar9462_2p0_radio_core); 26162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 26262306a36Sopenharmony_ci ar9462_2p0_radio_postamble); 26362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant, 26462306a36Sopenharmony_ci ar9462_2p0_radio_postamble_sys2ant); 26562306a36Sopenharmony_ci 26662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 26762306a36Sopenharmony_ci ar9462_2p0_soc_preamble); 26862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 26962306a36Sopenharmony_ci ar9462_2p0_soc_postamble); 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 27262306a36Sopenharmony_ci ar9462_2p0_common_rx_gain); 27362306a36Sopenharmony_ci 27462306a36Sopenharmony_ci /* Awake -> Sleep Setting */ 27562306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 27662306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) { 27762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 27862306a36Sopenharmony_ci ar9462_2p0_pciephy_clkreq_disable_L1); 27962306a36Sopenharmony_ci } 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci /* Sleep -> Awake Setting */ 28262306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 28362306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) { 28462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 28562306a36Sopenharmony_ci ar9462_2p0_pciephy_clkreq_disable_L1); 28662306a36Sopenharmony_ci } 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci /* Fast clock modal settings */ 28962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 29062306a36Sopenharmony_ci ar9462_2p0_modes_fast_clock); 29162306a36Sopenharmony_ci 29262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 29362306a36Sopenharmony_ci ar9462_2p0_baseband_core_txfir_coeff_japan_2484); 29462306a36Sopenharmony_ci } else if (AR_SREV_9550(ah)) { 29562306a36Sopenharmony_ci /* mac */ 29662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 29762306a36Sopenharmony_ci ar955x_1p0_mac_core); 29862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 29962306a36Sopenharmony_ci ar955x_1p0_mac_postamble); 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci /* bb */ 30262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 30362306a36Sopenharmony_ci ar955x_1p0_baseband_core); 30462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 30562306a36Sopenharmony_ci ar955x_1p0_baseband_postamble); 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci /* radio */ 30862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 30962306a36Sopenharmony_ci ar955x_1p0_radio_core); 31062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 31162306a36Sopenharmony_ci ar955x_1p0_radio_postamble); 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_ci /* soc */ 31462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 31562306a36Sopenharmony_ci ar955x_1p0_soc_preamble); 31662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 31762306a36Sopenharmony_ci ar955x_1p0_soc_postamble); 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci /* rx/tx gain */ 32062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 32162306a36Sopenharmony_ci ar955x_1p0_common_wo_xlna_rx_gain_table); 32262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 32362306a36Sopenharmony_ci ar955x_1p0_common_wo_xlna_rx_gain_bounds); 32462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 32562306a36Sopenharmony_ci ar955x_1p0_modes_xpa_tx_gain_table); 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci /* Fast clock modal settings */ 32862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 32962306a36Sopenharmony_ci ar955x_1p0_modes_fast_clock); 33062306a36Sopenharmony_ci } else if (AR_SREV_9531(ah)) { 33162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 33262306a36Sopenharmony_ci qca953x_1p0_mac_core); 33362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 33462306a36Sopenharmony_ci qca953x_1p0_mac_postamble); 33562306a36Sopenharmony_ci if (AR_SREV_9531_20(ah)) { 33662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 33762306a36Sopenharmony_ci qca953x_2p0_baseband_core); 33862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 33962306a36Sopenharmony_ci qca953x_2p0_baseband_postamble); 34062306a36Sopenharmony_ci } else { 34162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 34262306a36Sopenharmony_ci qca953x_1p0_baseband_core); 34362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 34462306a36Sopenharmony_ci qca953x_1p0_baseband_postamble); 34562306a36Sopenharmony_ci } 34662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 34762306a36Sopenharmony_ci qca953x_1p0_radio_core); 34862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 34962306a36Sopenharmony_ci qca953x_1p0_radio_postamble); 35062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 35162306a36Sopenharmony_ci qca953x_1p0_soc_preamble); 35262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 35362306a36Sopenharmony_ci qca953x_1p0_soc_postamble); 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_ci if (AR_SREV_9531_20(ah)) { 35662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 35762306a36Sopenharmony_ci qca953x_2p0_common_wo_xlna_rx_gain_table); 35862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 35962306a36Sopenharmony_ci qca953x_2p0_common_wo_xlna_rx_gain_bounds); 36062306a36Sopenharmony_ci } else { 36162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 36262306a36Sopenharmony_ci qca953x_1p0_common_wo_xlna_rx_gain_table); 36362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 36462306a36Sopenharmony_ci qca953x_1p0_common_wo_xlna_rx_gain_bounds); 36562306a36Sopenharmony_ci } 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_ci if (AR_SREV_9531_20(ah)) 36862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 36962306a36Sopenharmony_ci qca953x_2p0_modes_no_xpa_tx_gain_table); 37062306a36Sopenharmony_ci else if (AR_SREV_9531_11(ah)) 37162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 37262306a36Sopenharmony_ci qca953x_1p1_modes_no_xpa_tx_gain_table); 37362306a36Sopenharmony_ci else 37462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 37562306a36Sopenharmony_ci qca953x_1p0_modes_no_xpa_tx_gain_table); 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 37862306a36Sopenharmony_ci qca953x_1p0_modes_fast_clock); 37962306a36Sopenharmony_ci } else if (AR_SREV_9561(ah)) { 38062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 38162306a36Sopenharmony_ci qca956x_1p0_mac_core); 38262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 38362306a36Sopenharmony_ci qca956x_1p0_mac_postamble); 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 38662306a36Sopenharmony_ci qca956x_1p0_baseband_core); 38762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 38862306a36Sopenharmony_ci qca956x_1p0_baseband_postamble); 38962306a36Sopenharmony_ci 39062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 39162306a36Sopenharmony_ci qca956x_1p0_radio_core); 39262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 39362306a36Sopenharmony_ci qca956x_1p0_radio_postamble); 39462306a36Sopenharmony_ci 39562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 39662306a36Sopenharmony_ci qca956x_1p0_soc_preamble); 39762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 39862306a36Sopenharmony_ci qca956x_1p0_soc_postamble); 39962306a36Sopenharmony_ci 40062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 40162306a36Sopenharmony_ci qca956x_1p0_common_wo_xlna_rx_gain_table); 40262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 40362306a36Sopenharmony_ci qca956x_1p0_common_wo_xlna_rx_gain_bounds); 40462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 40562306a36Sopenharmony_ci qca956x_1p0_modes_no_xpa_tx_gain_table); 40662306a36Sopenharmony_ci 40762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_dfs, 40862306a36Sopenharmony_ci qca956x_1p0_baseband_postamble_dfs_channel); 40962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 41062306a36Sopenharmony_ci qca956x_1p0_baseband_core_txfir_coeff_japan_2484); 41162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 41262306a36Sopenharmony_ci qca956x_1p0_modes_fast_clock); 41362306a36Sopenharmony_ci } else if (AR_SREV_9580(ah)) { 41462306a36Sopenharmony_ci /* mac */ 41562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 41662306a36Sopenharmony_ci ar9580_1p0_mac_core); 41762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 41862306a36Sopenharmony_ci ar9580_1p0_mac_postamble); 41962306a36Sopenharmony_ci 42062306a36Sopenharmony_ci /* bb */ 42162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 42262306a36Sopenharmony_ci ar9580_1p0_baseband_core); 42362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 42462306a36Sopenharmony_ci ar9580_1p0_baseband_postamble); 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_ci /* radio */ 42762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 42862306a36Sopenharmony_ci ar9580_1p0_radio_core); 42962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 43062306a36Sopenharmony_ci ar9580_1p0_radio_postamble); 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_ci /* soc */ 43362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 43462306a36Sopenharmony_ci ar9580_1p0_soc_preamble); 43562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 43662306a36Sopenharmony_ci ar9580_1p0_soc_postamble); 43762306a36Sopenharmony_ci 43862306a36Sopenharmony_ci /* rx/tx gain */ 43962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 44062306a36Sopenharmony_ci ar9580_1p0_rx_gain_table); 44162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 44262306a36Sopenharmony_ci ar9580_1p0_low_ob_db_tx_gain_table); 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 44562306a36Sopenharmony_ci ar9580_1p0_modes_fast_clock); 44662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 44762306a36Sopenharmony_ci ar9580_1p0_baseband_core_txfir_coeff_japan_2484); 44862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_dfs, 44962306a36Sopenharmony_ci ar9580_1p0_baseband_postamble_dfs_channel); 45062306a36Sopenharmony_ci } else if (AR_SREV_9565_11_OR_LATER(ah)) { 45162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 45262306a36Sopenharmony_ci ar9565_1p1_mac_core); 45362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 45462306a36Sopenharmony_ci ar9565_1p1_mac_postamble); 45562306a36Sopenharmony_ci 45662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 45762306a36Sopenharmony_ci ar9565_1p1_baseband_core); 45862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 45962306a36Sopenharmony_ci ar9565_1p1_baseband_postamble); 46062306a36Sopenharmony_ci 46162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 46262306a36Sopenharmony_ci ar9565_1p1_radio_core); 46362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 46462306a36Sopenharmony_ci ar9565_1p1_radio_postamble); 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 46762306a36Sopenharmony_ci ar9565_1p1_soc_preamble); 46862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 46962306a36Sopenharmony_ci ar9565_1p1_soc_postamble); 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 47262306a36Sopenharmony_ci ar9565_1p1_Common_rx_gain_table); 47362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 47462306a36Sopenharmony_ci ar9565_1p1_Modes_lowest_ob_db_tx_gain_table); 47562306a36Sopenharmony_ci 47662306a36Sopenharmony_ci /* Awake -> Sleep Setting */ 47762306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 47862306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) { 47962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 48062306a36Sopenharmony_ci ar9565_1p1_pciephy_clkreq_disable_L1); 48162306a36Sopenharmony_ci } 48262306a36Sopenharmony_ci 48362306a36Sopenharmony_ci /* Sleep -> Awake Setting */ 48462306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 48562306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) { 48662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 48762306a36Sopenharmony_ci ar9565_1p1_pciephy_clkreq_disable_L1); 48862306a36Sopenharmony_ci } 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 49162306a36Sopenharmony_ci ar9565_1p1_modes_fast_clock); 49262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 49362306a36Sopenharmony_ci ar9565_1p1_baseband_core_txfir_coeff_japan_2484); 49462306a36Sopenharmony_ci } else if (AR_SREV_9565(ah)) { 49562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 49662306a36Sopenharmony_ci ar9565_1p0_mac_core); 49762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 49862306a36Sopenharmony_ci ar9565_1p0_mac_postamble); 49962306a36Sopenharmony_ci 50062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 50162306a36Sopenharmony_ci ar9565_1p0_baseband_core); 50262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 50362306a36Sopenharmony_ci ar9565_1p0_baseband_postamble); 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 50662306a36Sopenharmony_ci ar9565_1p0_radio_core); 50762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 50862306a36Sopenharmony_ci ar9565_1p0_radio_postamble); 50962306a36Sopenharmony_ci 51062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 51162306a36Sopenharmony_ci ar9565_1p0_soc_preamble); 51262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 51362306a36Sopenharmony_ci ar9565_1p0_soc_postamble); 51462306a36Sopenharmony_ci 51562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 51662306a36Sopenharmony_ci ar9565_1p0_Common_rx_gain_table); 51762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 51862306a36Sopenharmony_ci ar9565_1p0_Modes_lowest_ob_db_tx_gain_table); 51962306a36Sopenharmony_ci 52062306a36Sopenharmony_ci /* Awake -> Sleep Setting */ 52162306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 52262306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D3)) { 52362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 52462306a36Sopenharmony_ci ar9565_1p0_pciephy_clkreq_disable_L1); 52562306a36Sopenharmony_ci } 52662306a36Sopenharmony_ci 52762306a36Sopenharmony_ci /* Sleep -> Awake Setting */ 52862306a36Sopenharmony_ci if ((ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_CONTROL) && 52962306a36Sopenharmony_ci (ah->config.pll_pwrsave & AR_PCIE_PLL_PWRSAVE_ON_D0)) { 53062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 53162306a36Sopenharmony_ci ar9565_1p0_pciephy_clkreq_disable_L1); 53262306a36Sopenharmony_ci } 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 53562306a36Sopenharmony_ci ar9565_1p0_modes_fast_clock); 53662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 53762306a36Sopenharmony_ci ar9565_1p0_baseband_core_txfir_coeff_japan_2484); 53862306a36Sopenharmony_ci } else { 53962306a36Sopenharmony_ci /* mac */ 54062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 54162306a36Sopenharmony_ci ar9300_2p2_mac_core); 54262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], 54362306a36Sopenharmony_ci ar9300_2p2_mac_postamble); 54462306a36Sopenharmony_ci 54562306a36Sopenharmony_ci /* bb */ 54662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], 54762306a36Sopenharmony_ci ar9300_2p2_baseband_core); 54862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], 54962306a36Sopenharmony_ci ar9300_2p2_baseband_postamble); 55062306a36Sopenharmony_ci 55162306a36Sopenharmony_ci /* radio */ 55262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], 55362306a36Sopenharmony_ci ar9300_2p2_radio_core); 55462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], 55562306a36Sopenharmony_ci ar9300_2p2_radio_postamble); 55662306a36Sopenharmony_ci 55762306a36Sopenharmony_ci /* soc */ 55862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], 55962306a36Sopenharmony_ci ar9300_2p2_soc_preamble); 56062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], 56162306a36Sopenharmony_ci ar9300_2p2_soc_postamble); 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci /* rx/tx gain */ 56462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 56562306a36Sopenharmony_ci ar9300Common_rx_gain_table_2p2); 56662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 56762306a36Sopenharmony_ci ar9300Modes_lowest_ob_db_tx_gain_table_2p2); 56862306a36Sopenharmony_ci 56962306a36Sopenharmony_ci /* Load PCIE SERDES settings from INI */ 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ci /* Awake Setting */ 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdes, 57462306a36Sopenharmony_ci ar9300PciePhy_pll_on_clkreq_disable_L1_2p2); 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_ci /* Sleep Setting */ 57762306a36Sopenharmony_ci 57862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, 57962306a36Sopenharmony_ci ar9300PciePhy_pll_on_clkreq_disable_L1_2p2); 58062306a36Sopenharmony_ci 58162306a36Sopenharmony_ci /* Fast clock modal settings */ 58262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesFastClock, 58362306a36Sopenharmony_ci ar9300Modes_fast_clock_2p2); 58462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 58562306a36Sopenharmony_ci ar9300_2p2_baseband_core_txfir_coeff_japan_2484); 58662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_dfs, 58762306a36Sopenharmony_ci ar9300_2p2_baseband_postamble_dfs_channel); 58862306a36Sopenharmony_ci } 58962306a36Sopenharmony_ci} 59062306a36Sopenharmony_ci 59162306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode0(struct ath_hw *ah) 59262306a36Sopenharmony_ci{ 59362306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 59462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 59562306a36Sopenharmony_ci ar9331_modes_lowest_ob_db_tx_gain_1p2); 59662306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 59762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 59862306a36Sopenharmony_ci ar9331_modes_lowest_ob_db_tx_gain_1p1); 59962306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 60062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 60162306a36Sopenharmony_ci ar9340Modes_lowest_ob_db_tx_gain_table_1p0); 60262306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 60362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 60462306a36Sopenharmony_ci ar9485_modes_lowest_ob_db_tx_gain_1_1); 60562306a36Sopenharmony_ci else if (AR_SREV_9550(ah)) 60662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 60762306a36Sopenharmony_ci ar955x_1p0_modes_xpa_tx_gain_table); 60862306a36Sopenharmony_ci else if (AR_SREV_9531_10(ah)) 60962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 61062306a36Sopenharmony_ci qca953x_1p0_modes_xpa_tx_gain_table); 61162306a36Sopenharmony_ci else if (AR_SREV_9531_11(ah)) 61262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 61362306a36Sopenharmony_ci qca953x_1p1_modes_xpa_tx_gain_table); 61462306a36Sopenharmony_ci else if (AR_SREV_9531_20(ah)) 61562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 61662306a36Sopenharmony_ci qca953x_2p0_modes_xpa_tx_gain_table); 61762306a36Sopenharmony_ci else if (AR_SREV_9561(ah)) 61862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 61962306a36Sopenharmony_ci qca956x_1p0_modes_xpa_tx_gain_table); 62062306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 62162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 62262306a36Sopenharmony_ci ar9580_1p0_lowest_ob_db_tx_gain_table); 62362306a36Sopenharmony_ci else if (AR_SREV_9462_21(ah)) 62462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 62562306a36Sopenharmony_ci ar9462_2p1_modes_low_ob_db_tx_gain); 62662306a36Sopenharmony_ci else if (AR_SREV_9462_20(ah)) 62762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 62862306a36Sopenharmony_ci ar9462_2p0_modes_low_ob_db_tx_gain); 62962306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 63062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 63162306a36Sopenharmony_ci ar9565_1p1_modes_low_ob_db_tx_gain_table); 63262306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 63362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 63462306a36Sopenharmony_ci ar9565_1p0_modes_low_ob_db_tx_gain_table); 63562306a36Sopenharmony_ci else 63662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 63762306a36Sopenharmony_ci ar9300Modes_lowest_ob_db_tx_gain_table_2p2); 63862306a36Sopenharmony_ci} 63962306a36Sopenharmony_ci 64062306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode1(struct ath_hw *ah) 64162306a36Sopenharmony_ci{ 64262306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 64362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 64462306a36Sopenharmony_ci ar9331_modes_high_ob_db_tx_gain_1p2); 64562306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 64662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 64762306a36Sopenharmony_ci ar9331_modes_high_ob_db_tx_gain_1p1); 64862306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 64962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 65062306a36Sopenharmony_ci ar9340Modes_high_ob_db_tx_gain_table_1p0); 65162306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 65262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 65362306a36Sopenharmony_ci ar9485Modes_high_ob_db_tx_gain_1_1); 65462306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 65562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 65662306a36Sopenharmony_ci ar9580_1p0_high_ob_db_tx_gain_table); 65762306a36Sopenharmony_ci else if (AR_SREV_9550(ah)) 65862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 65962306a36Sopenharmony_ci ar955x_1p0_modes_no_xpa_tx_gain_table); 66062306a36Sopenharmony_ci else if (AR_SREV_9531(ah)) { 66162306a36Sopenharmony_ci if (AR_SREV_9531_20(ah)) 66262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 66362306a36Sopenharmony_ci qca953x_2p0_modes_no_xpa_tx_gain_table); 66462306a36Sopenharmony_ci else if (AR_SREV_9531_11(ah)) 66562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 66662306a36Sopenharmony_ci qca953x_1p1_modes_no_xpa_tx_gain_table); 66762306a36Sopenharmony_ci else 66862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 66962306a36Sopenharmony_ci qca953x_1p0_modes_no_xpa_tx_gain_table); 67062306a36Sopenharmony_ci } else if (AR_SREV_9561(ah)) 67162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 67262306a36Sopenharmony_ci qca956x_1p0_modes_no_xpa_tx_gain_table); 67362306a36Sopenharmony_ci else if (AR_SREV_9462_21(ah)) 67462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 67562306a36Sopenharmony_ci ar9462_2p1_modes_high_ob_db_tx_gain); 67662306a36Sopenharmony_ci else if (AR_SREV_9462_20(ah)) 67762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 67862306a36Sopenharmony_ci ar9462_2p0_modes_high_ob_db_tx_gain); 67962306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 68062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 68162306a36Sopenharmony_ci ar9565_1p1_modes_high_ob_db_tx_gain_table); 68262306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 68362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 68462306a36Sopenharmony_ci ar9565_1p0_modes_high_ob_db_tx_gain_table); 68562306a36Sopenharmony_ci else 68662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 68762306a36Sopenharmony_ci ar9300Modes_high_ob_db_tx_gain_table_2p2); 68862306a36Sopenharmony_ci} 68962306a36Sopenharmony_ci 69062306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode2(struct ath_hw *ah) 69162306a36Sopenharmony_ci{ 69262306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 69362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 69462306a36Sopenharmony_ci ar9331_modes_low_ob_db_tx_gain_1p2); 69562306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 69662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 69762306a36Sopenharmony_ci ar9331_modes_low_ob_db_tx_gain_1p1); 69862306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 69962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 70062306a36Sopenharmony_ci ar9340Modes_low_ob_db_tx_gain_table_1p0); 70162306a36Sopenharmony_ci else if (AR_SREV_9531_11(ah)) 70262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 70362306a36Sopenharmony_ci qca953x_1p1_modes_no_xpa_low_power_tx_gain_table); 70462306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 70562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 70662306a36Sopenharmony_ci ar9485Modes_low_ob_db_tx_gain_1_1); 70762306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 70862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 70962306a36Sopenharmony_ci ar9580_1p0_low_ob_db_tx_gain_table); 71062306a36Sopenharmony_ci else if (AR_SREV_9561(ah)) 71162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 71262306a36Sopenharmony_ci qca956x_1p0_modes_no_xpa_low_ob_db_tx_gain_table); 71362306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 71462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 71562306a36Sopenharmony_ci ar9565_1p1_modes_low_ob_db_tx_gain_table); 71662306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 71762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 71862306a36Sopenharmony_ci ar9565_1p0_modes_low_ob_db_tx_gain_table); 71962306a36Sopenharmony_ci else 72062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 72162306a36Sopenharmony_ci ar9300Modes_low_ob_db_tx_gain_table_2p2); 72262306a36Sopenharmony_ci} 72362306a36Sopenharmony_ci 72462306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode3(struct ath_hw *ah) 72562306a36Sopenharmony_ci{ 72662306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 72762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 72862306a36Sopenharmony_ci ar9331_modes_high_power_tx_gain_1p2); 72962306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 73062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 73162306a36Sopenharmony_ci ar9331_modes_high_power_tx_gain_1p1); 73262306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 73362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 73462306a36Sopenharmony_ci ar9340Modes_high_power_tx_gain_table_1p0); 73562306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 73662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 73762306a36Sopenharmony_ci ar9485Modes_high_power_tx_gain_1_1); 73862306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 73962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 74062306a36Sopenharmony_ci ar9580_1p0_high_power_tx_gain_table); 74162306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 74262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 74362306a36Sopenharmony_ci ar9565_1p1_modes_high_power_tx_gain_table); 74462306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 74562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 74662306a36Sopenharmony_ci ar9565_1p0_modes_high_power_tx_gain_table); 74762306a36Sopenharmony_ci else { 74862306a36Sopenharmony_ci if (ah->config.tx_gain_buffalo) 74962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 75062306a36Sopenharmony_ci ar9300Modes_high_power_tx_gain_table_buffalo); 75162306a36Sopenharmony_ci else 75262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 75362306a36Sopenharmony_ci ar9300Modes_high_power_tx_gain_table_2p2); 75462306a36Sopenharmony_ci } 75562306a36Sopenharmony_ci} 75662306a36Sopenharmony_ci 75762306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode4(struct ath_hw *ah) 75862306a36Sopenharmony_ci{ 75962306a36Sopenharmony_ci if (AR_SREV_9340(ah)) 76062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 76162306a36Sopenharmony_ci ar9340Modes_mixed_ob_db_tx_gain_table_1p0); 76262306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 76362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 76462306a36Sopenharmony_ci ar9580_1p0_mixed_ob_db_tx_gain_table); 76562306a36Sopenharmony_ci else if (AR_SREV_9462_21(ah)) 76662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 76762306a36Sopenharmony_ci ar9462_2p1_modes_mix_ob_db_tx_gain); 76862306a36Sopenharmony_ci else if (AR_SREV_9462_20(ah)) 76962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 77062306a36Sopenharmony_ci ar9462_2p0_modes_mix_ob_db_tx_gain); 77162306a36Sopenharmony_ci else 77262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 77362306a36Sopenharmony_ci ar9300Modes_mixed_ob_db_tx_gain_table_2p2); 77462306a36Sopenharmony_ci} 77562306a36Sopenharmony_ci 77662306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode5(struct ath_hw *ah) 77762306a36Sopenharmony_ci{ 77862306a36Sopenharmony_ci if (AR_SREV_9485_11_OR_LATER(ah)) 77962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 78062306a36Sopenharmony_ci ar9485Modes_green_ob_db_tx_gain_1_1); 78162306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 78262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 78362306a36Sopenharmony_ci ar9580_1p0_type5_tx_gain_table); 78462306a36Sopenharmony_ci else if (AR_SREV_9561(ah)) 78562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 78662306a36Sopenharmony_ci qca956x_1p0_modes_no_xpa_green_tx_gain_table); 78762306a36Sopenharmony_ci else if (AR_SREV_9300_22(ah)) 78862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 78962306a36Sopenharmony_ci ar9300Modes_type5_tx_gain_table_2p2); 79062306a36Sopenharmony_ci} 79162306a36Sopenharmony_ci 79262306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode6(struct ath_hw *ah) 79362306a36Sopenharmony_ci{ 79462306a36Sopenharmony_ci if (AR_SREV_9340(ah)) 79562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 79662306a36Sopenharmony_ci ar9340Modes_low_ob_db_and_spur_tx_gain_table_1p0); 79762306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 79862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 79962306a36Sopenharmony_ci ar9485Modes_green_spur_ob_db_tx_gain_1_1); 80062306a36Sopenharmony_ci else if (AR_SREV_9580(ah)) 80162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 80262306a36Sopenharmony_ci ar9580_1p0_type6_tx_gain_table); 80362306a36Sopenharmony_ci} 80462306a36Sopenharmony_ci 80562306a36Sopenharmony_cistatic void ar9003_tx_gain_table_mode7(struct ath_hw *ah) 80662306a36Sopenharmony_ci{ 80762306a36Sopenharmony_ci if (AR_SREV_9340(ah)) 80862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesTxGain, 80962306a36Sopenharmony_ci ar9340_cus227_tx_gain_table_1p0); 81062306a36Sopenharmony_ci} 81162306a36Sopenharmony_ci 81262306a36Sopenharmony_citypedef void (*ath_txgain_tab)(struct ath_hw *ah); 81362306a36Sopenharmony_ci 81462306a36Sopenharmony_cistatic void ar9003_tx_gain_table_apply(struct ath_hw *ah) 81562306a36Sopenharmony_ci{ 81662306a36Sopenharmony_ci static const ath_txgain_tab modes[] = { 81762306a36Sopenharmony_ci ar9003_tx_gain_table_mode0, 81862306a36Sopenharmony_ci ar9003_tx_gain_table_mode1, 81962306a36Sopenharmony_ci ar9003_tx_gain_table_mode2, 82062306a36Sopenharmony_ci ar9003_tx_gain_table_mode3, 82162306a36Sopenharmony_ci ar9003_tx_gain_table_mode4, 82262306a36Sopenharmony_ci ar9003_tx_gain_table_mode5, 82362306a36Sopenharmony_ci ar9003_tx_gain_table_mode6, 82462306a36Sopenharmony_ci ar9003_tx_gain_table_mode7, 82562306a36Sopenharmony_ci }; 82662306a36Sopenharmony_ci int idx = ar9003_hw_get_tx_gain_idx(ah); 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_ci if (idx >= ARRAY_SIZE(modes)) 82962306a36Sopenharmony_ci idx = 0; 83062306a36Sopenharmony_ci 83162306a36Sopenharmony_ci modes[idx](ah); 83262306a36Sopenharmony_ci} 83362306a36Sopenharmony_ci 83462306a36Sopenharmony_cistatic void ar9003_rx_gain_table_mode0(struct ath_hw *ah) 83562306a36Sopenharmony_ci{ 83662306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 83762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 83862306a36Sopenharmony_ci ar9331_common_rx_gain_1p2); 83962306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 84062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 84162306a36Sopenharmony_ci ar9331_common_rx_gain_1p1); 84262306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 84362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 84462306a36Sopenharmony_ci ar9340Common_rx_gain_table_1p0); 84562306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 84662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 84762306a36Sopenharmony_ci ar9485_common_rx_gain_1_1); 84862306a36Sopenharmony_ci else if (AR_SREV_9550(ah)) { 84962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 85062306a36Sopenharmony_ci ar955x_1p0_common_rx_gain_table); 85162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 85262306a36Sopenharmony_ci ar955x_1p0_common_rx_gain_bounds); 85362306a36Sopenharmony_ci } else if (AR_SREV_9531(ah)) { 85462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 85562306a36Sopenharmony_ci qca953x_1p0_common_rx_gain_table); 85662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 85762306a36Sopenharmony_ci qca953x_1p0_common_rx_gain_bounds); 85862306a36Sopenharmony_ci } else if (AR_SREV_9561(ah)) { 85962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 86062306a36Sopenharmony_ci qca956x_1p0_common_rx_gain_table); 86162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 86262306a36Sopenharmony_ci qca956x_1p0_common_rx_gain_bounds); 86362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_xlna, 86462306a36Sopenharmony_ci qca956x_1p0_xlna_only); 86562306a36Sopenharmony_ci } else if (AR_SREV_9580(ah)) 86662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 86762306a36Sopenharmony_ci ar9580_1p0_rx_gain_table); 86862306a36Sopenharmony_ci else if (AR_SREV_9462_21(ah)) 86962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 87062306a36Sopenharmony_ci ar9462_2p1_common_rx_gain); 87162306a36Sopenharmony_ci else if (AR_SREV_9462_20(ah)) 87262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 87362306a36Sopenharmony_ci ar9462_2p0_common_rx_gain); 87462306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 87562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 87662306a36Sopenharmony_ci ar9565_1p1_Common_rx_gain_table); 87762306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 87862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 87962306a36Sopenharmony_ci ar9565_1p0_Common_rx_gain_table); 88062306a36Sopenharmony_ci else 88162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 88262306a36Sopenharmony_ci ar9300Common_rx_gain_table_2p2); 88362306a36Sopenharmony_ci} 88462306a36Sopenharmony_ci 88562306a36Sopenharmony_cistatic void ar9003_rx_gain_table_mode1(struct ath_hw *ah) 88662306a36Sopenharmony_ci{ 88762306a36Sopenharmony_ci if (AR_SREV_9330_12(ah)) 88862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 88962306a36Sopenharmony_ci ar9331_common_wo_xlna_rx_gain_1p2); 89062306a36Sopenharmony_ci else if (AR_SREV_9330_11(ah)) 89162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 89262306a36Sopenharmony_ci ar9331_common_wo_xlna_rx_gain_1p1); 89362306a36Sopenharmony_ci else if (AR_SREV_9340(ah)) 89462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 89562306a36Sopenharmony_ci ar9340Common_wo_xlna_rx_gain_table_1p0); 89662306a36Sopenharmony_ci else if (AR_SREV_9485_11_OR_LATER(ah)) 89762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 89862306a36Sopenharmony_ci ar9485Common_wo_xlna_rx_gain_1_1); 89962306a36Sopenharmony_ci else if (AR_SREV_9462_21(ah)) 90062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 90162306a36Sopenharmony_ci ar9462_2p1_common_wo_xlna_rx_gain); 90262306a36Sopenharmony_ci else if (AR_SREV_9462_20(ah)) 90362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 90462306a36Sopenharmony_ci ar9462_2p0_common_wo_xlna_rx_gain); 90562306a36Sopenharmony_ci else if (AR_SREV_9550(ah)) { 90662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 90762306a36Sopenharmony_ci ar955x_1p0_common_wo_xlna_rx_gain_table); 90862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 90962306a36Sopenharmony_ci ar955x_1p0_common_wo_xlna_rx_gain_bounds); 91062306a36Sopenharmony_ci } else if (AR_SREV_9531_10(ah) || AR_SREV_9531_11(ah)) { 91162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 91262306a36Sopenharmony_ci qca953x_1p0_common_wo_xlna_rx_gain_table); 91362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 91462306a36Sopenharmony_ci qca953x_1p0_common_wo_xlna_rx_gain_bounds); 91562306a36Sopenharmony_ci } else if (AR_SREV_9531_20(ah)) { 91662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 91762306a36Sopenharmony_ci qca953x_2p0_common_wo_xlna_rx_gain_table); 91862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 91962306a36Sopenharmony_ci qca953x_2p0_common_wo_xlna_rx_gain_bounds); 92062306a36Sopenharmony_ci } else if (AR_SREV_9561(ah)) { 92162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 92262306a36Sopenharmony_ci qca956x_1p0_common_wo_xlna_rx_gain_table); 92362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, 92462306a36Sopenharmony_ci qca956x_1p0_common_wo_xlna_rx_gain_bounds); 92562306a36Sopenharmony_ci } else if (AR_SREV_9580(ah)) 92662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 92762306a36Sopenharmony_ci ar9580_1p0_wo_xlna_rx_gain_table); 92862306a36Sopenharmony_ci else if (AR_SREV_9565_11(ah)) 92962306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 93062306a36Sopenharmony_ci ar9565_1p1_common_wo_xlna_rx_gain_table); 93162306a36Sopenharmony_ci else if (AR_SREV_9565(ah)) 93262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 93362306a36Sopenharmony_ci ar9565_1p0_common_wo_xlna_rx_gain_table); 93462306a36Sopenharmony_ci else 93562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 93662306a36Sopenharmony_ci ar9300Common_wo_xlna_rx_gain_table_2p2); 93762306a36Sopenharmony_ci} 93862306a36Sopenharmony_ci 93962306a36Sopenharmony_cistatic void ar9003_rx_gain_table_mode2(struct ath_hw *ah) 94062306a36Sopenharmony_ci{ 94162306a36Sopenharmony_ci if (AR_SREV_9462_21(ah)) { 94262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 94362306a36Sopenharmony_ci ar9462_2p1_common_mixed_rx_gain); 94462306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_core, 94562306a36Sopenharmony_ci ar9462_2p1_baseband_core_mix_rxgain); 94662306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_postamble, 94762306a36Sopenharmony_ci ar9462_2p1_baseband_postamble_mix_rxgain); 94862306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_xlna, 94962306a36Sopenharmony_ci ar9462_2p1_baseband_postamble_5g_xlna); 95062306a36Sopenharmony_ci } else if (AR_SREV_9462_20(ah)) { 95162306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 95262306a36Sopenharmony_ci ar9462_2p0_common_mixed_rx_gain); 95362306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_core, 95462306a36Sopenharmony_ci ar9462_2p0_baseband_core_mix_rxgain); 95562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_postamble, 95662306a36Sopenharmony_ci ar9462_2p0_baseband_postamble_mix_rxgain); 95762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_xlna, 95862306a36Sopenharmony_ci ar9462_2p0_baseband_postamble_5g_xlna); 95962306a36Sopenharmony_ci } 96062306a36Sopenharmony_ci} 96162306a36Sopenharmony_ci 96262306a36Sopenharmony_cistatic void ar9003_rx_gain_table_mode3(struct ath_hw *ah) 96362306a36Sopenharmony_ci{ 96462306a36Sopenharmony_ci if (AR_SREV_9462_21(ah)) { 96562306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 96662306a36Sopenharmony_ci ar9462_2p1_common_5g_xlna_only_rxgain); 96762306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_xlna, 96862306a36Sopenharmony_ci ar9462_2p1_baseband_postamble_5g_xlna); 96962306a36Sopenharmony_ci } else if (AR_SREV_9462_20(ah)) { 97062306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->iniModesRxGain, 97162306a36Sopenharmony_ci ar9462_2p0_common_5g_xlna_only_rxgain); 97262306a36Sopenharmony_ci INIT_INI_ARRAY(&ah->ini_modes_rxgain_xlna, 97362306a36Sopenharmony_ci ar9462_2p0_baseband_postamble_5g_xlna); 97462306a36Sopenharmony_ci } 97562306a36Sopenharmony_ci} 97662306a36Sopenharmony_ci 97762306a36Sopenharmony_cistatic void ar9003_rx_gain_table_apply(struct ath_hw *ah) 97862306a36Sopenharmony_ci{ 97962306a36Sopenharmony_ci switch (ar9003_hw_get_rx_gain_idx(ah)) { 98062306a36Sopenharmony_ci case 0: 98162306a36Sopenharmony_ci default: 98262306a36Sopenharmony_ci ar9003_rx_gain_table_mode0(ah); 98362306a36Sopenharmony_ci break; 98462306a36Sopenharmony_ci case 1: 98562306a36Sopenharmony_ci ar9003_rx_gain_table_mode1(ah); 98662306a36Sopenharmony_ci break; 98762306a36Sopenharmony_ci case 2: 98862306a36Sopenharmony_ci ar9003_rx_gain_table_mode2(ah); 98962306a36Sopenharmony_ci break; 99062306a36Sopenharmony_ci case 3: 99162306a36Sopenharmony_ci ar9003_rx_gain_table_mode3(ah); 99262306a36Sopenharmony_ci break; 99362306a36Sopenharmony_ci } 99462306a36Sopenharmony_ci} 99562306a36Sopenharmony_ci 99662306a36Sopenharmony_ci/* set gain table pointers according to values read from the eeprom */ 99762306a36Sopenharmony_cistatic void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah) 99862306a36Sopenharmony_ci{ 99962306a36Sopenharmony_ci ar9003_tx_gain_table_apply(ah); 100062306a36Sopenharmony_ci ar9003_rx_gain_table_apply(ah); 100162306a36Sopenharmony_ci} 100262306a36Sopenharmony_ci 100362306a36Sopenharmony_ci/* 100462306a36Sopenharmony_ci * Helper for ASPM support. 100562306a36Sopenharmony_ci * 100662306a36Sopenharmony_ci * Disable PLL when in L0s as well as receiver clock when in L1. 100762306a36Sopenharmony_ci * This power saving option must be enabled through the SerDes. 100862306a36Sopenharmony_ci * 100962306a36Sopenharmony_ci * Programming the SerDes must go through the same 288 bit serial shift 101062306a36Sopenharmony_ci * register as the other analog registers. Hence the 9 writes. 101162306a36Sopenharmony_ci */ 101262306a36Sopenharmony_cistatic void ar9003_hw_configpcipowersave(struct ath_hw *ah, 101362306a36Sopenharmony_ci bool power_off) 101462306a36Sopenharmony_ci{ 101562306a36Sopenharmony_ci unsigned int i; 101662306a36Sopenharmony_ci struct ar5416IniArray *array; 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ci /* 101962306a36Sopenharmony_ci * Increase L1 Entry Latency. Some WB222 boards don't have 102062306a36Sopenharmony_ci * this change in eeprom/OTP. 102162306a36Sopenharmony_ci * 102262306a36Sopenharmony_ci */ 102362306a36Sopenharmony_ci if (AR_SREV_9462(ah)) { 102462306a36Sopenharmony_ci u32 val = ah->config.aspm_l1_fix; 102562306a36Sopenharmony_ci if ((val & 0xff000000) == 0x17000000) { 102662306a36Sopenharmony_ci val &= 0x00ffffff; 102762306a36Sopenharmony_ci val |= 0x27000000; 102862306a36Sopenharmony_ci REG_WRITE(ah, 0x570c, val); 102962306a36Sopenharmony_ci } 103062306a36Sopenharmony_ci } 103162306a36Sopenharmony_ci 103262306a36Sopenharmony_ci /* Nothing to do on restore for 11N */ 103362306a36Sopenharmony_ci if (!power_off /* !restore */) { 103462306a36Sopenharmony_ci /* set bit 19 to allow forcing of pcie core into L1 state */ 103562306a36Sopenharmony_ci REG_SET_BIT(ah, AR_PCIE_PM_CTRL(ah), AR_PCIE_PM_CTRL_ENA); 103662306a36Sopenharmony_ci REG_WRITE(ah, AR_WA(ah), ah->WARegVal); 103762306a36Sopenharmony_ci } 103862306a36Sopenharmony_ci 103962306a36Sopenharmony_ci /* 104062306a36Sopenharmony_ci * Configure PCIE after Ini init. SERDES values now come from ini file 104162306a36Sopenharmony_ci * This enables PCIe low power mode. 104262306a36Sopenharmony_ci */ 104362306a36Sopenharmony_ci array = power_off ? &ah->iniPcieSerdes : 104462306a36Sopenharmony_ci &ah->iniPcieSerdesLowPower; 104562306a36Sopenharmony_ci 104662306a36Sopenharmony_ci for (i = 0; i < array->ia_rows; i++) { 104762306a36Sopenharmony_ci REG_WRITE(ah, 104862306a36Sopenharmony_ci INI_RA(array, i, 0), 104962306a36Sopenharmony_ci INI_RA(array, i, 1)); 105062306a36Sopenharmony_ci } 105162306a36Sopenharmony_ci} 105262306a36Sopenharmony_ci 105362306a36Sopenharmony_cistatic void ar9003_hw_init_hang_checks(struct ath_hw *ah) 105462306a36Sopenharmony_ci{ 105562306a36Sopenharmony_ci /* 105662306a36Sopenharmony_ci * All chips support detection of BB/MAC hangs. 105762306a36Sopenharmony_ci */ 105862306a36Sopenharmony_ci ah->config.hw_hang_checks |= HW_BB_WATCHDOG; 105962306a36Sopenharmony_ci ah->config.hw_hang_checks |= HW_MAC_HANG; 106062306a36Sopenharmony_ci 106162306a36Sopenharmony_ci /* 106262306a36Sopenharmony_ci * This is not required for AR9580 1.0 106362306a36Sopenharmony_ci */ 106462306a36Sopenharmony_ci if (AR_SREV_9300_22(ah)) 106562306a36Sopenharmony_ci ah->config.hw_hang_checks |= HW_PHYRESTART_CLC_WAR; 106662306a36Sopenharmony_ci 106762306a36Sopenharmony_ci if (AR_SREV_9330(ah)) 106862306a36Sopenharmony_ci ah->bb_watchdog_timeout_ms = 85; 106962306a36Sopenharmony_ci else 107062306a36Sopenharmony_ci ah->bb_watchdog_timeout_ms = 25; 107162306a36Sopenharmony_ci} 107262306a36Sopenharmony_ci 107362306a36Sopenharmony_ci/* 107462306a36Sopenharmony_ci * MAC HW hang check 107562306a36Sopenharmony_ci * ================= 107662306a36Sopenharmony_ci * 107762306a36Sopenharmony_ci * Signature: dcu_chain_state is 0x6 and dcu_complete_state is 0x1. 107862306a36Sopenharmony_ci * 107962306a36Sopenharmony_ci * The state of each DCU chain (mapped to TX queues) is available from these 108062306a36Sopenharmony_ci * DMA debug registers: 108162306a36Sopenharmony_ci * 108262306a36Sopenharmony_ci * Chain 0 state : Bits 4:0 of AR_DMADBG_4 108362306a36Sopenharmony_ci * Chain 1 state : Bits 9:5 of AR_DMADBG_4 108462306a36Sopenharmony_ci * Chain 2 state : Bits 14:10 of AR_DMADBG_4 108562306a36Sopenharmony_ci * Chain 3 state : Bits 19:15 of AR_DMADBG_4 108662306a36Sopenharmony_ci * Chain 4 state : Bits 24:20 of AR_DMADBG_4 108762306a36Sopenharmony_ci * Chain 5 state : Bits 29:25 of AR_DMADBG_4 108862306a36Sopenharmony_ci * Chain 6 state : Bits 4:0 of AR_DMADBG_5 108962306a36Sopenharmony_ci * Chain 7 state : Bits 9:5 of AR_DMADBG_5 109062306a36Sopenharmony_ci * Chain 8 state : Bits 14:10 of AR_DMADBG_5 109162306a36Sopenharmony_ci * Chain 9 state : Bits 19:15 of AR_DMADBG_5 109262306a36Sopenharmony_ci * 109362306a36Sopenharmony_ci * The DCU chain state "0x6" means "WAIT_FRDONE" - wait for TX frame to be done. 109462306a36Sopenharmony_ci */ 109562306a36Sopenharmony_ci 109662306a36Sopenharmony_ci#define NUM_STATUS_READS 50 109762306a36Sopenharmony_ci 109862306a36Sopenharmony_cistatic bool ath9k_hw_verify_hang(struct ath_hw *ah, unsigned int queue) 109962306a36Sopenharmony_ci{ 110062306a36Sopenharmony_ci u32 dma_dbg_chain, dma_dbg_complete; 110162306a36Sopenharmony_ci u8 dcu_chain_state, dcu_complete_state; 110262306a36Sopenharmony_ci unsigned int dbg_reg, reg_offset; 110362306a36Sopenharmony_ci int i; 110462306a36Sopenharmony_ci 110562306a36Sopenharmony_ci if (queue < 6) { 110662306a36Sopenharmony_ci dbg_reg = AR_DMADBG_4; 110762306a36Sopenharmony_ci reg_offset = queue * 5; 110862306a36Sopenharmony_ci } else { 110962306a36Sopenharmony_ci dbg_reg = AR_DMADBG_5; 111062306a36Sopenharmony_ci reg_offset = (queue - 6) * 5; 111162306a36Sopenharmony_ci } 111262306a36Sopenharmony_ci 111362306a36Sopenharmony_ci for (i = 0; i < NUM_STATUS_READS; i++) { 111462306a36Sopenharmony_ci dma_dbg_chain = REG_READ(ah, dbg_reg); 111562306a36Sopenharmony_ci dma_dbg_complete = REG_READ(ah, AR_DMADBG_6); 111662306a36Sopenharmony_ci 111762306a36Sopenharmony_ci dcu_chain_state = (dma_dbg_chain >> reg_offset) & 0x1f; 111862306a36Sopenharmony_ci dcu_complete_state = dma_dbg_complete & 0x3; 111962306a36Sopenharmony_ci 112062306a36Sopenharmony_ci if ((dcu_chain_state != 0x6) || (dcu_complete_state != 0x1)) 112162306a36Sopenharmony_ci return false; 112262306a36Sopenharmony_ci } 112362306a36Sopenharmony_ci 112462306a36Sopenharmony_ci ath_dbg(ath9k_hw_common(ah), RESET, 112562306a36Sopenharmony_ci "MAC Hang signature found for queue: %d\n", queue); 112662306a36Sopenharmony_ci 112762306a36Sopenharmony_ci return true; 112862306a36Sopenharmony_ci} 112962306a36Sopenharmony_ci 113062306a36Sopenharmony_cistatic bool ar9003_hw_detect_mac_hang(struct ath_hw *ah) 113162306a36Sopenharmony_ci{ 113262306a36Sopenharmony_ci u32 dma_dbg_4, dma_dbg_5, dma_dbg_6, chk_dbg; 113362306a36Sopenharmony_ci u8 dcu_chain_state, dcu_complete_state; 113462306a36Sopenharmony_ci bool dcu_wait_frdone = false; 113562306a36Sopenharmony_ci unsigned long chk_dcu = 0; 113662306a36Sopenharmony_ci unsigned int reg_offset; 113762306a36Sopenharmony_ci unsigned int i = 0; 113862306a36Sopenharmony_ci 113962306a36Sopenharmony_ci dma_dbg_4 = REG_READ(ah, AR_DMADBG_4); 114062306a36Sopenharmony_ci dma_dbg_5 = REG_READ(ah, AR_DMADBG_5); 114162306a36Sopenharmony_ci dma_dbg_6 = REG_READ(ah, AR_DMADBG_6); 114262306a36Sopenharmony_ci 114362306a36Sopenharmony_ci dcu_complete_state = dma_dbg_6 & 0x3; 114462306a36Sopenharmony_ci if (dcu_complete_state != 0x1) 114562306a36Sopenharmony_ci goto exit; 114662306a36Sopenharmony_ci 114762306a36Sopenharmony_ci for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { 114862306a36Sopenharmony_ci if (i < 6) { 114962306a36Sopenharmony_ci chk_dbg = dma_dbg_4; 115062306a36Sopenharmony_ci reg_offset = i * 5; 115162306a36Sopenharmony_ci } else { 115262306a36Sopenharmony_ci chk_dbg = dma_dbg_5; 115362306a36Sopenharmony_ci reg_offset = (i - 6) * 5; 115462306a36Sopenharmony_ci } 115562306a36Sopenharmony_ci 115662306a36Sopenharmony_ci dcu_chain_state = (chk_dbg >> reg_offset) & 0x1f; 115762306a36Sopenharmony_ci if (dcu_chain_state == 0x6) { 115862306a36Sopenharmony_ci dcu_wait_frdone = true; 115962306a36Sopenharmony_ci chk_dcu |= BIT(i); 116062306a36Sopenharmony_ci } 116162306a36Sopenharmony_ci } 116262306a36Sopenharmony_ci 116362306a36Sopenharmony_ci if ((dcu_complete_state == 0x1) && dcu_wait_frdone) { 116462306a36Sopenharmony_ci for_each_set_bit(i, &chk_dcu, ATH9K_NUM_TX_QUEUES) { 116562306a36Sopenharmony_ci if (ath9k_hw_verify_hang(ah, i)) 116662306a36Sopenharmony_ci return true; 116762306a36Sopenharmony_ci } 116862306a36Sopenharmony_ci } 116962306a36Sopenharmony_ciexit: 117062306a36Sopenharmony_ci return false; 117162306a36Sopenharmony_ci} 117262306a36Sopenharmony_ci 117362306a36Sopenharmony_ci/* Sets up the AR9003 hardware familiy callbacks */ 117462306a36Sopenharmony_civoid ar9003_hw_attach_ops(struct ath_hw *ah) 117562306a36Sopenharmony_ci{ 117662306a36Sopenharmony_ci struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); 117762306a36Sopenharmony_ci struct ath_hw_ops *ops = ath9k_hw_ops(ah); 117862306a36Sopenharmony_ci 117962306a36Sopenharmony_ci ar9003_hw_init_mode_regs(ah); 118062306a36Sopenharmony_ci 118162306a36Sopenharmony_ci if (AR_SREV_9003_PCOEM(ah)) { 118262306a36Sopenharmony_ci WARN_ON(!ah->iniPcieSerdes.ia_array); 118362306a36Sopenharmony_ci WARN_ON(!ah->iniPcieSerdesLowPower.ia_array); 118462306a36Sopenharmony_ci } 118562306a36Sopenharmony_ci 118662306a36Sopenharmony_ci priv_ops->init_mode_gain_regs = ar9003_hw_init_mode_gain_regs; 118762306a36Sopenharmony_ci priv_ops->init_hang_checks = ar9003_hw_init_hang_checks; 118862306a36Sopenharmony_ci priv_ops->detect_mac_hang = ar9003_hw_detect_mac_hang; 118962306a36Sopenharmony_ci 119062306a36Sopenharmony_ci ops->config_pci_powersave = ar9003_hw_configpcipowersave; 119162306a36Sopenharmony_ci 119262306a36Sopenharmony_ci ar9003_hw_attach_phy_ops(ah); 119362306a36Sopenharmony_ci ar9003_hw_attach_calib_ops(ah); 119462306a36Sopenharmony_ci ar9003_hw_attach_mac_ops(ah); 119562306a36Sopenharmony_ci ar9003_hw_attach_aic_ops(ah); 119662306a36Sopenharmony_ci} 1197