Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 1 | /* |
Sujith Manoharan | 5b68138 | 2011-05-17 13:36:18 +0530 | [diff] [blame] | 2 | * Copyright (c) 2008-2011 Atheros Communications Inc. |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any |
| 5 | * purpose with or without fee is hereby granted, provided that the above |
| 6 | * copyright notice and this permission notice appear in all copies. |
| 7 | * |
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 15 | */ |
| 16 | |
| 17 | #include "hw.h" |
Luis R. Rodriguez | b622a72 | 2010-04-15 17:39:28 -0400 | [diff] [blame] | 18 | #include "ar9003_mac.h" |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 19 | #include "ar9003_2p2_initvals.h" |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 20 | #include "ar9485_initvals.h" |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 21 | #include "ar9340_initvals.h" |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 22 | #include "ar9330_1p1_initvals.h" |
| 23 | #include "ar9330_1p2_initvals.h" |
Gabor Juhos | a0fbb9b | 2012-07-03 19:13:22 +0200 | [diff] [blame] | 24 | #include "ar955x_1p0_initvals.h" |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 25 | #include "ar9580_1p0_initvals.h" |
Rajkumar Manoharan | 76db2f8 | 2011-10-13 11:00:43 +0530 | [diff] [blame] | 26 | #include "ar9462_2p0_initvals.h" |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 27 | |
| 28 | /* General hardware code for the AR9003 hadware family */ |
| 29 | |
Luis R. Rodriguez | 886b42b | 2010-10-14 11:44:27 -0700 | [diff] [blame] | 30 | /* |
| 31 | * The AR9003 family uses a new INI format (pre, core, post |
| 32 | * arrays per subsystem). This provides support for the |
| 33 | * AR9003 2.2 chipsets. |
| 34 | */ |
| 35 | static void ar9003_hw_init_mode_regs(struct ath_hw *ah) |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 36 | { |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 37 | #define PCIE_PLL_ON_CREQ_DIS_L1_2P0 \ |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 38 | ar9462_pciephy_pll_on_clkreq_disable_L1_2p0 |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 39 | |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 40 | #define AR9462_BB_CTX_COEFJ(x) \ |
| 41 | ar9462_##x##_baseband_core_txfir_coeff_japan_2484 |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 42 | |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 43 | #define AR9462_BBC_TXIFR_COEFFJ \ |
| 44 | ar9462_2p0_baseband_core_txfir_coeff_japan_2484 |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 45 | if (AR_SREV_9330_11(ah)) { |
| 46 | /* mac */ |
| 47 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 48 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 49 | ar9331_1p1_mac_core, |
| 50 | ARRAY_SIZE(ar9331_1p1_mac_core), 2); |
| 51 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 52 | ar9331_1p1_mac_postamble, |
| 53 | ARRAY_SIZE(ar9331_1p1_mac_postamble), 5); |
| 54 | |
| 55 | /* bb */ |
| 56 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 57 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 58 | ar9331_1p1_baseband_core, |
| 59 | ARRAY_SIZE(ar9331_1p1_baseband_core), 2); |
| 60 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 61 | ar9331_1p1_baseband_postamble, |
| 62 | ARRAY_SIZE(ar9331_1p1_baseband_postamble), 5); |
| 63 | |
| 64 | /* radio */ |
| 65 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 66 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 67 | ar9331_1p1_radio_core, |
| 68 | ARRAY_SIZE(ar9331_1p1_radio_core), 2); |
| 69 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], NULL, 0, 0); |
| 70 | |
| 71 | /* soc */ |
| 72 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 73 | ar9331_1p1_soc_preamble, |
| 74 | ARRAY_SIZE(ar9331_1p1_soc_preamble), 2); |
| 75 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 76 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 77 | ar9331_1p1_soc_postamble, |
| 78 | ARRAY_SIZE(ar9331_1p1_soc_postamble), 2); |
| 79 | |
| 80 | /* rx/tx gain */ |
| 81 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 82 | ar9331_common_rx_gain_1p1, |
| 83 | ARRAY_SIZE(ar9331_common_rx_gain_1p1), 2); |
| 84 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 85 | ar9331_modes_lowest_ob_db_tx_gain_1p1, |
| 86 | ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p1), |
| 87 | 5); |
| 88 | |
| 89 | /* additional clock settings */ |
| 90 | if (ah->is_clk_25mhz) |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 91 | INIT_INI_ARRAY(&ah->iniAdditional, |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 92 | ar9331_1p1_xtal_25M, |
| 93 | ARRAY_SIZE(ar9331_1p1_xtal_25M), 2); |
| 94 | else |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 95 | INIT_INI_ARRAY(&ah->iniAdditional, |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 96 | ar9331_1p1_xtal_40M, |
| 97 | ARRAY_SIZE(ar9331_1p1_xtal_40M), 2); |
| 98 | } else if (AR_SREV_9330_12(ah)) { |
| 99 | /* mac */ |
| 100 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 101 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 102 | ar9331_1p2_mac_core, |
| 103 | ARRAY_SIZE(ar9331_1p2_mac_core), 2); |
| 104 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 105 | ar9331_1p2_mac_postamble, |
| 106 | ARRAY_SIZE(ar9331_1p2_mac_postamble), 5); |
| 107 | |
| 108 | /* bb */ |
| 109 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 110 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 111 | ar9331_1p2_baseband_core, |
| 112 | ARRAY_SIZE(ar9331_1p2_baseband_core), 2); |
| 113 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 114 | ar9331_1p2_baseband_postamble, |
| 115 | ARRAY_SIZE(ar9331_1p2_baseband_postamble), 5); |
| 116 | |
| 117 | /* radio */ |
| 118 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 119 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 120 | ar9331_1p2_radio_core, |
| 121 | ARRAY_SIZE(ar9331_1p2_radio_core), 2); |
| 122 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], NULL, 0, 0); |
| 123 | |
| 124 | /* soc */ |
| 125 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 126 | ar9331_1p2_soc_preamble, |
| 127 | ARRAY_SIZE(ar9331_1p2_soc_preamble), 2); |
| 128 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 129 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 130 | ar9331_1p2_soc_postamble, |
| 131 | ARRAY_SIZE(ar9331_1p2_soc_postamble), 2); |
| 132 | |
| 133 | /* rx/tx gain */ |
| 134 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 135 | ar9331_common_rx_gain_1p2, |
| 136 | ARRAY_SIZE(ar9331_common_rx_gain_1p2), 2); |
| 137 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 138 | ar9331_modes_lowest_ob_db_tx_gain_1p2, |
| 139 | ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p2), |
| 140 | 5); |
| 141 | |
| 142 | /* additional clock settings */ |
| 143 | if (ah->is_clk_25mhz) |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 144 | INIT_INI_ARRAY(&ah->iniAdditional, |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 145 | ar9331_1p2_xtal_25M, |
| 146 | ARRAY_SIZE(ar9331_1p2_xtal_25M), 2); |
| 147 | else |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 148 | INIT_INI_ARRAY(&ah->iniAdditional, |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 149 | ar9331_1p2_xtal_40M, |
| 150 | ARRAY_SIZE(ar9331_1p2_xtal_40M), 2); |
| 151 | } else if (AR_SREV_9340(ah)) { |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 152 | /* mac */ |
| 153 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 154 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 155 | ar9340_1p0_mac_core, |
| 156 | ARRAY_SIZE(ar9340_1p0_mac_core), 2); |
| 157 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 158 | ar9340_1p0_mac_postamble, |
| 159 | ARRAY_SIZE(ar9340_1p0_mac_postamble), 5); |
| 160 | |
| 161 | /* bb */ |
| 162 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 163 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 164 | ar9340_1p0_baseband_core, |
| 165 | ARRAY_SIZE(ar9340_1p0_baseband_core), 2); |
| 166 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 167 | ar9340_1p0_baseband_postamble, |
| 168 | ARRAY_SIZE(ar9340_1p0_baseband_postamble), 5); |
| 169 | |
| 170 | /* radio */ |
| 171 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 172 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 173 | ar9340_1p0_radio_core, |
| 174 | ARRAY_SIZE(ar9340_1p0_radio_core), 2); |
| 175 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 176 | ar9340_1p0_radio_postamble, |
| 177 | ARRAY_SIZE(ar9340_1p0_radio_postamble), 5); |
| 178 | |
| 179 | /* soc */ |
| 180 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 181 | ar9340_1p0_soc_preamble, |
| 182 | ARRAY_SIZE(ar9340_1p0_soc_preamble), 2); |
| 183 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 184 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 185 | ar9340_1p0_soc_postamble, |
| 186 | ARRAY_SIZE(ar9340_1p0_soc_postamble), 5); |
| 187 | |
| 188 | /* rx/tx gain */ |
| 189 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 190 | ar9340Common_wo_xlna_rx_gain_table_1p0, |
| 191 | ARRAY_SIZE(ar9340Common_wo_xlna_rx_gain_table_1p0), |
| 192 | 5); |
| 193 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 194 | ar9340Modes_high_ob_db_tx_gain_table_1p0, |
| 195 | ARRAY_SIZE(ar9340Modes_high_ob_db_tx_gain_table_1p0), |
| 196 | 5); |
| 197 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 198 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 199 | ar9340Modes_fast_clock_1p0, |
| 200 | ARRAY_SIZE(ar9340Modes_fast_clock_1p0), |
| 201 | 3); |
| 202 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 203 | if (!ah->is_clk_25mhz) |
| 204 | INIT_INI_ARRAY(&ah->iniAdditional, |
| 205 | ar9340_1p0_radio_core_40M, |
| 206 | ARRAY_SIZE(ar9340_1p0_radio_core_40M), |
| 207 | 2); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 208 | } else if (AR_SREV_9485_11(ah)) { |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 209 | /* mac */ |
| 210 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 211 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 212 | ar9485_1_1_mac_core, |
| 213 | ARRAY_SIZE(ar9485_1_1_mac_core), 2); |
| 214 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 215 | ar9485_1_1_mac_postamble, |
| 216 | ARRAY_SIZE(ar9485_1_1_mac_postamble), 5); |
| 217 | |
| 218 | /* bb */ |
| 219 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], ar9485_1_1, |
| 220 | ARRAY_SIZE(ar9485_1_1), 2); |
| 221 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 222 | ar9485_1_1_baseband_core, |
| 223 | ARRAY_SIZE(ar9485_1_1_baseband_core), 2); |
| 224 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 225 | ar9485_1_1_baseband_postamble, |
| 226 | ARRAY_SIZE(ar9485_1_1_baseband_postamble), 5); |
| 227 | |
| 228 | /* radio */ |
| 229 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 230 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 231 | ar9485_1_1_radio_core, |
| 232 | ARRAY_SIZE(ar9485_1_1_radio_core), 2); |
| 233 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 234 | ar9485_1_1_radio_postamble, |
| 235 | ARRAY_SIZE(ar9485_1_1_radio_postamble), 2); |
| 236 | |
| 237 | /* soc */ |
| 238 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 239 | ar9485_1_1_soc_preamble, |
| 240 | ARRAY_SIZE(ar9485_1_1_soc_preamble), 2); |
| 241 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 242 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], NULL, 0, 0); |
| 243 | |
| 244 | /* rx/tx gain */ |
| 245 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Vasanthakumar Thiagarajan | 832fd35 | 2011-04-01 15:32:16 +0530 | [diff] [blame] | 246 | ar9485Common_wo_xlna_rx_gain_1_1, |
| 247 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), 2); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 248 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 249 | ar9485_modes_lowest_ob_db_tx_gain_1_1, |
| 250 | ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1), |
| 251 | 5); |
| 252 | |
| 253 | /* Load PCIE SERDES settings from INI */ |
| 254 | |
| 255 | /* Awake Setting */ |
| 256 | |
| 257 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
Vivek Natarajan | 06fed57 | 2011-02-25 17:31:01 +0530 | [diff] [blame] | 258 | ar9485_1_1_pcie_phy_clkreq_disable_L1, |
| 259 | ARRAY_SIZE(ar9485_1_1_pcie_phy_clkreq_disable_L1), |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 260 | 2); |
| 261 | |
| 262 | /* Sleep Setting */ |
| 263 | |
| 264 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
Vivek Natarajan | 06fed57 | 2011-02-25 17:31:01 +0530 | [diff] [blame] | 265 | ar9485_1_1_pcie_phy_clkreq_disable_L1, |
| 266 | ARRAY_SIZE(ar9485_1_1_pcie_phy_clkreq_disable_L1), |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 267 | 2); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 268 | } else if (AR_SREV_9462_20(ah)) { |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 269 | |
| 270 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 271 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core, |
| 272 | ARRAY_SIZE(ar9462_2p0_mac_core), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 273 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 274 | ar9462_2p0_mac_postamble, |
| 275 | ARRAY_SIZE(ar9462_2p0_mac_postamble), 5); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 276 | |
| 277 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 278 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 279 | ar9462_2p0_baseband_core, |
| 280 | ARRAY_SIZE(ar9462_2p0_baseband_core), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 281 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 282 | ar9462_2p0_baseband_postamble, |
| 283 | ARRAY_SIZE(ar9462_2p0_baseband_postamble), 5); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 284 | |
| 285 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 286 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 287 | ar9462_2p0_radio_core, |
| 288 | ARRAY_SIZE(ar9462_2p0_radio_core), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 289 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 290 | ar9462_2p0_radio_postamble, |
| 291 | ARRAY_SIZE(ar9462_2p0_radio_postamble), 5); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 292 | INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 293 | ar9462_2p0_radio_postamble_sys2ant, |
| 294 | ARRAY_SIZE(ar9462_2p0_radio_postamble_sys2ant), |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 295 | 5); |
| 296 | |
| 297 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 298 | ar9462_2p0_soc_preamble, |
| 299 | ARRAY_SIZE(ar9462_2p0_soc_preamble), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 300 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 301 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 302 | ar9462_2p0_soc_postamble, |
| 303 | ARRAY_SIZE(ar9462_2p0_soc_postamble), 5); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 304 | |
| 305 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 306 | ar9462_common_rx_gain_table_2p0, |
| 307 | ARRAY_SIZE(ar9462_common_rx_gain_table_2p0), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 308 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 309 | /* Awake -> Sleep Setting */ |
| 310 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 311 | PCIE_PLL_ON_CREQ_DIS_L1_2P0, |
| 312 | ARRAY_SIZE(PCIE_PLL_ON_CREQ_DIS_L1_2P0), |
| 313 | 2); |
| 314 | /* Sleep -> Awake Setting */ |
| 315 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
| 316 | PCIE_PLL_ON_CREQ_DIS_L1_2P0, |
| 317 | ARRAY_SIZE(PCIE_PLL_ON_CREQ_DIS_L1_2P0), |
| 318 | 2); |
| 319 | |
| 320 | /* Fast clock modal settings */ |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 321 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 322 | ar9462_modes_fast_clock_2p0, |
| 323 | ARRAY_SIZE(ar9462_modes_fast_clock_2p0), 3); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 324 | |
| 325 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 326 | AR9462_BB_CTX_COEFJ(2p0), |
| 327 | ARRAY_SIZE(AR9462_BB_CTX_COEFJ(2p0)), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 328 | |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 329 | INIT_INI_ARRAY(&ah->ini_japan2484, AR9462_BBC_TXIFR_COEFFJ, |
| 330 | ARRAY_SIZE(AR9462_BBC_TXIFR_COEFFJ), 2); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 331 | } else if (AR_SREV_9550(ah)) { |
| 332 | /* mac */ |
| 333 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 334 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 335 | ar955x_1p0_mac_core, |
| 336 | ARRAY_SIZE(ar955x_1p0_mac_core), 2); |
| 337 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 338 | ar955x_1p0_mac_postamble, |
| 339 | ARRAY_SIZE(ar955x_1p0_mac_postamble), 5); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 340 | |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 341 | /* bb */ |
| 342 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 343 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 344 | ar955x_1p0_baseband_core, |
| 345 | ARRAY_SIZE(ar955x_1p0_baseband_core), 2); |
| 346 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 347 | ar955x_1p0_baseband_postamble, |
| 348 | ARRAY_SIZE(ar955x_1p0_baseband_postamble), 5); |
| 349 | |
| 350 | /* radio */ |
| 351 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 352 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 353 | ar955x_1p0_radio_core, |
| 354 | ARRAY_SIZE(ar955x_1p0_radio_core), 2); |
| 355 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 356 | ar955x_1p0_radio_postamble, |
| 357 | ARRAY_SIZE(ar955x_1p0_radio_postamble), 5); |
| 358 | |
| 359 | /* soc */ |
| 360 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 361 | ar955x_1p0_soc_preamble, |
| 362 | ARRAY_SIZE(ar955x_1p0_soc_preamble), 2); |
| 363 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 364 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 365 | ar955x_1p0_soc_postamble, |
| 366 | ARRAY_SIZE(ar955x_1p0_soc_postamble), 5); |
| 367 | |
| 368 | /* rx/tx gain */ |
| 369 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 370 | ar955x_1p0_common_wo_xlna_rx_gain_table, |
| 371 | ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_table), |
| 372 | 2); |
| 373 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
| 374 | ar955x_1p0_common_wo_xlna_rx_gain_bounds, |
| 375 | ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_bounds), |
| 376 | 5); |
| 377 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 378 | ar955x_1p0_modes_xpa_tx_gain_table, |
| 379 | ARRAY_SIZE(ar955x_1p0_modes_xpa_tx_gain_table), |
| 380 | 9); |
| 381 | |
| 382 | /* Fast clock modal settings */ |
| 383 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
| 384 | ar955x_1p0_modes_fast_clock, |
| 385 | ARRAY_SIZE(ar955x_1p0_modes_fast_clock), 3); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 386 | } else if (AR_SREV_9580(ah)) { |
| 387 | /* mac */ |
| 388 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 389 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 390 | ar9580_1p0_mac_core, |
| 391 | ARRAY_SIZE(ar9580_1p0_mac_core), 2); |
| 392 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 393 | ar9580_1p0_mac_postamble, |
| 394 | ARRAY_SIZE(ar9580_1p0_mac_postamble), 5); |
| 395 | |
| 396 | /* bb */ |
| 397 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 398 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 399 | ar9580_1p0_baseband_core, |
| 400 | ARRAY_SIZE(ar9580_1p0_baseband_core), 2); |
| 401 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 402 | ar9580_1p0_baseband_postamble, |
| 403 | ARRAY_SIZE(ar9580_1p0_baseband_postamble), 5); |
| 404 | |
| 405 | /* radio */ |
| 406 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 407 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 408 | ar9580_1p0_radio_core, |
| 409 | ARRAY_SIZE(ar9580_1p0_radio_core), 2); |
| 410 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 411 | ar9580_1p0_radio_postamble, |
| 412 | ARRAY_SIZE(ar9580_1p0_radio_postamble), 5); |
| 413 | |
| 414 | /* soc */ |
| 415 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 416 | ar9580_1p0_soc_preamble, |
| 417 | ARRAY_SIZE(ar9580_1p0_soc_preamble), 2); |
| 418 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 419 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 420 | ar9580_1p0_soc_postamble, |
| 421 | ARRAY_SIZE(ar9580_1p0_soc_postamble), 5); |
| 422 | |
| 423 | /* rx/tx gain */ |
| 424 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 425 | ar9580_1p0_rx_gain_table, |
| 426 | ARRAY_SIZE(ar9580_1p0_rx_gain_table), 2); |
| 427 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 428 | ar9580_1p0_low_ob_db_tx_gain_table, |
| 429 | ARRAY_SIZE(ar9580_1p0_low_ob_db_tx_gain_table), |
| 430 | 5); |
| 431 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 432 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 433 | ar9580_1p0_modes_fast_clock, |
| 434 | ARRAY_SIZE(ar9580_1p0_modes_fast_clock), |
| 435 | 3); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 436 | } else { |
| 437 | /* mac */ |
| 438 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); |
| 439 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 440 | ar9300_2p2_mac_core, |
| 441 | ARRAY_SIZE(ar9300_2p2_mac_core), 2); |
| 442 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 443 | ar9300_2p2_mac_postamble, |
| 444 | ARRAY_SIZE(ar9300_2p2_mac_postamble), 5); |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 445 | |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 446 | /* bb */ |
| 447 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); |
| 448 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 449 | ar9300_2p2_baseband_core, |
| 450 | ARRAY_SIZE(ar9300_2p2_baseband_core), 2); |
| 451 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 452 | ar9300_2p2_baseband_postamble, |
| 453 | ARRAY_SIZE(ar9300_2p2_baseband_postamble), 5); |
| 454 | |
| 455 | /* radio */ |
| 456 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); |
| 457 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 458 | ar9300_2p2_radio_core, |
| 459 | ARRAY_SIZE(ar9300_2p2_radio_core), 2); |
| 460 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 461 | ar9300_2p2_radio_postamble, |
| 462 | ARRAY_SIZE(ar9300_2p2_radio_postamble), 5); |
| 463 | |
| 464 | /* soc */ |
| 465 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 466 | ar9300_2p2_soc_preamble, |
| 467 | ARRAY_SIZE(ar9300_2p2_soc_preamble), 2); |
| 468 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); |
| 469 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 470 | ar9300_2p2_soc_postamble, |
| 471 | ARRAY_SIZE(ar9300_2p2_soc_postamble), 5); |
| 472 | |
| 473 | /* rx/tx gain */ |
| 474 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 475 | ar9300Common_rx_gain_table_2p2, |
| 476 | ARRAY_SIZE(ar9300Common_rx_gain_table_2p2), 2); |
| 477 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 478 | ar9300Modes_lowest_ob_db_tx_gain_table_2p2, |
| 479 | ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p2), |
| 480 | 5); |
| 481 | |
| 482 | /* Load PCIE SERDES settings from INI */ |
| 483 | |
| 484 | /* Awake Setting */ |
| 485 | |
| 486 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 487 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p2, |
| 488 | ARRAY_SIZE(ar9300PciePhy_pll_on_clkreq_disable_L1_2p2), |
| 489 | 2); |
| 490 | |
| 491 | /* Sleep Setting */ |
| 492 | |
| 493 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
Luis R. Rodriguez | 58c5296 | 2011-01-13 18:19:29 -0800 | [diff] [blame] | 494 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p2, |
| 495 | ARRAY_SIZE(ar9300PciePhy_pll_on_clkreq_disable_L1_2p2), |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 496 | 2); |
| 497 | |
| 498 | /* Fast clock modal settings */ |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 499 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 500 | ar9300Modes_fast_clock_2p2, |
| 501 | ARRAY_SIZE(ar9300Modes_fast_clock_2p2), |
| 502 | 3); |
| 503 | } |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 504 | } |
| 505 | |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 506 | static void ar9003_tx_gain_table_mode0(struct ath_hw *ah) |
| 507 | { |
| 508 | if (AR_SREV_9330_12(ah)) |
| 509 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 510 | ar9331_modes_lowest_ob_db_tx_gain_1p2, |
| 511 | ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p2), |
| 512 | 5); |
| 513 | else if (AR_SREV_9330_11(ah)) |
| 514 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 515 | ar9331_modes_lowest_ob_db_tx_gain_1p1, |
| 516 | ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p1), |
| 517 | 5); |
| 518 | else if (AR_SREV_9340(ah)) |
| 519 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 520 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0, |
| 521 | ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0), |
| 522 | 5); |
| 523 | else if (AR_SREV_9485_11(ah)) |
| 524 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 525 | ar9485_modes_lowest_ob_db_tx_gain_1_1, |
| 526 | ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1), |
| 527 | 5); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 528 | else if (AR_SREV_9550(ah)) |
| 529 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 530 | ar955x_1p0_modes_xpa_tx_gain_table, |
| 531 | ARRAY_SIZE(ar955x_1p0_modes_xpa_tx_gain_table), |
| 532 | 9); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 533 | else if (AR_SREV_9580(ah)) |
| 534 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 535 | ar9580_1p0_lowest_ob_db_tx_gain_table, |
| 536 | ARRAY_SIZE(ar9580_1p0_lowest_ob_db_tx_gain_table), |
| 537 | 5); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 538 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 539 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 540 | ar9462_modes_low_ob_db_tx_gain_table_2p0, |
| 541 | ARRAY_SIZE(ar9462_modes_low_ob_db_tx_gain_table_2p0), |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 542 | 5); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 543 | else |
| 544 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 545 | ar9300Modes_lowest_ob_db_tx_gain_table_2p2, |
| 546 | ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p2), |
| 547 | 5); |
| 548 | } |
| 549 | |
| 550 | static void ar9003_tx_gain_table_mode1(struct ath_hw *ah) |
| 551 | { |
| 552 | if (AR_SREV_9330_12(ah)) |
| 553 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 554 | ar9331_modes_high_ob_db_tx_gain_1p2, |
| 555 | ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p2), |
| 556 | 5); |
| 557 | else if (AR_SREV_9330_11(ah)) |
| 558 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 559 | ar9331_modes_high_ob_db_tx_gain_1p1, |
| 560 | ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p1), |
| 561 | 5); |
| 562 | else if (AR_SREV_9340(ah)) |
| 563 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame^] | 564 | ar9340Modes_high_ob_db_tx_gain_table_1p0, |
| 565 | ARRAY_SIZE(ar9340Modes_high_ob_db_tx_gain_table_1p0), |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 566 | 5); |
| 567 | else if (AR_SREV_9485_11(ah)) |
| 568 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 569 | ar9485Modes_high_ob_db_tx_gain_1_1, |
| 570 | ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_1), |
| 571 | 5); |
| 572 | else if (AR_SREV_9580(ah)) |
| 573 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 574 | ar9580_1p0_high_ob_db_tx_gain_table, |
| 575 | ARRAY_SIZE(ar9580_1p0_high_ob_db_tx_gain_table), |
| 576 | 5); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 577 | else if (AR_SREV_9550(ah)) |
| 578 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 579 | ar955x_1p0_modes_no_xpa_tx_gain_table, |
| 580 | ARRAY_SIZE(ar955x_1p0_modes_no_xpa_tx_gain_table), |
| 581 | 9); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 582 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 583 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 584 | ar9462_modes_high_ob_db_tx_gain_table_2p0, |
| 585 | ARRAY_SIZE(ar9462_modes_high_ob_db_tx_gain_table_2p0), |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 586 | 5); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 587 | else |
| 588 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 589 | ar9300Modes_high_ob_db_tx_gain_table_2p2, |
| 590 | ARRAY_SIZE(ar9300Modes_high_ob_db_tx_gain_table_2p2), |
| 591 | 5); |
| 592 | } |
| 593 | |
| 594 | static void ar9003_tx_gain_table_mode2(struct ath_hw *ah) |
| 595 | { |
| 596 | if (AR_SREV_9330_12(ah)) |
| 597 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 598 | ar9331_modes_low_ob_db_tx_gain_1p2, |
| 599 | ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p2), |
| 600 | 5); |
| 601 | else if (AR_SREV_9330_11(ah)) |
| 602 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 603 | ar9331_modes_low_ob_db_tx_gain_1p1, |
| 604 | ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p1), |
| 605 | 5); |
| 606 | else if (AR_SREV_9340(ah)) |
| 607 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame^] | 608 | ar9340Modes_low_ob_db_tx_gain_table_1p0, |
| 609 | ARRAY_SIZE(ar9340Modes_low_ob_db_tx_gain_table_1p0), |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 610 | 5); |
| 611 | else if (AR_SREV_9485_11(ah)) |
| 612 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 613 | ar9485Modes_low_ob_db_tx_gain_1_1, |
| 614 | ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_1), |
| 615 | 5); |
| 616 | else if (AR_SREV_9580(ah)) |
| 617 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 618 | ar9580_1p0_low_ob_db_tx_gain_table, |
| 619 | ARRAY_SIZE(ar9580_1p0_low_ob_db_tx_gain_table), |
| 620 | 5); |
| 621 | else |
| 622 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 623 | ar9300Modes_low_ob_db_tx_gain_table_2p2, |
| 624 | ARRAY_SIZE(ar9300Modes_low_ob_db_tx_gain_table_2p2), |
| 625 | 5); |
| 626 | } |
| 627 | |
| 628 | static void ar9003_tx_gain_table_mode3(struct ath_hw *ah) |
| 629 | { |
| 630 | if (AR_SREV_9330_12(ah)) |
| 631 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 632 | ar9331_modes_high_power_tx_gain_1p2, |
| 633 | ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p2), |
| 634 | 5); |
| 635 | else if (AR_SREV_9330_11(ah)) |
| 636 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 637 | ar9331_modes_high_power_tx_gain_1p1, |
| 638 | ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p1), |
| 639 | 5); |
| 640 | else if (AR_SREV_9340(ah)) |
| 641 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame^] | 642 | ar9340Modes_high_power_tx_gain_table_1p0, |
| 643 | ARRAY_SIZE(ar9340Modes_high_power_tx_gain_table_1p0), |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 644 | 5); |
| 645 | else if (AR_SREV_9485_11(ah)) |
| 646 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 647 | ar9485Modes_high_power_tx_gain_1_1, |
| 648 | ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_1), |
| 649 | 5); |
| 650 | else if (AR_SREV_9580(ah)) |
| 651 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 652 | ar9580_1p0_high_power_tx_gain_table, |
| 653 | ARRAY_SIZE(ar9580_1p0_high_power_tx_gain_table), |
| 654 | 5); |
| 655 | else |
| 656 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 657 | ar9300Modes_high_power_tx_gain_table_2p2, |
| 658 | ARRAY_SIZE(ar9300Modes_high_power_tx_gain_table_2p2), |
| 659 | 5); |
| 660 | } |
| 661 | |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame^] | 662 | static void ar9003_tx_gain_table_mode4(struct ath_hw *ah) |
| 663 | { |
| 664 | if (AR_SREV_9340(ah)) |
| 665 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 666 | ar9340Modes_mixed_ob_db_tx_gain_table_1p0, |
| 667 | ARRAY_SIZE(ar9340Modes_mixed_ob_db_tx_gain_table_1p0), |
| 668 | 5); |
| 669 | else if (AR_SREV_9580(ah)) |
| 670 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 671 | ar9580_1p0_mixed_ob_db_tx_gain_table, |
| 672 | ARRAY_SIZE(ar9580_1p0_mixed_ob_db_tx_gain_table), |
| 673 | 5); |
| 674 | } |
| 675 | |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 676 | static void ar9003_tx_gain_table_apply(struct ath_hw *ah) |
| 677 | { |
| 678 | switch (ar9003_hw_get_tx_gain_idx(ah)) { |
| 679 | case 0: |
| 680 | default: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 681 | ar9003_tx_gain_table_mode0(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 682 | break; |
| 683 | case 1: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 684 | ar9003_tx_gain_table_mode1(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 685 | break; |
| 686 | case 2: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 687 | ar9003_tx_gain_table_mode2(ah); |
Vasanthakumar Thiagarajan | ff48ba4 | 2010-12-06 04:27:38 -0800 | [diff] [blame] | 688 | break; |
| 689 | case 3: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 690 | ar9003_tx_gain_table_mode3(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 691 | break; |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame^] | 692 | case 4: |
| 693 | ar9003_tx_gain_table_mode4(ah); |
| 694 | break; |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 695 | } |
| 696 | } |
| 697 | |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 698 | static void ar9003_rx_gain_table_mode0(struct ath_hw *ah) |
| 699 | { |
| 700 | if (AR_SREV_9330_12(ah)) |
| 701 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 702 | ar9331_common_rx_gain_1p2, |
| 703 | ARRAY_SIZE(ar9331_common_rx_gain_1p2), |
| 704 | 2); |
| 705 | else if (AR_SREV_9330_11(ah)) |
| 706 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 707 | ar9331_common_rx_gain_1p1, |
| 708 | ARRAY_SIZE(ar9331_common_rx_gain_1p1), |
| 709 | 2); |
| 710 | else if (AR_SREV_9340(ah)) |
| 711 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 712 | ar9340Common_rx_gain_table_1p0, |
| 713 | ARRAY_SIZE(ar9340Common_rx_gain_table_1p0), |
| 714 | 2); |
| 715 | else if (AR_SREV_9485_11(ah)) |
| 716 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 717 | ar9485Common_wo_xlna_rx_gain_1_1, |
| 718 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), |
| 719 | 2); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 720 | else if (AR_SREV_9550(ah)) { |
| 721 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 722 | ar955x_1p0_common_rx_gain_table, |
| 723 | ARRAY_SIZE(ar955x_1p0_common_rx_gain_table), |
| 724 | 2); |
| 725 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
| 726 | ar955x_1p0_common_rx_gain_bounds, |
| 727 | ARRAY_SIZE(ar955x_1p0_common_rx_gain_bounds), |
| 728 | 5); |
| 729 | } else if (AR_SREV_9580(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 730 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 731 | ar9580_1p0_rx_gain_table, |
| 732 | ARRAY_SIZE(ar9580_1p0_rx_gain_table), |
| 733 | 2); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 734 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 735 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 736 | ar9462_common_rx_gain_table_2p0, |
| 737 | ARRAY_SIZE(ar9462_common_rx_gain_table_2p0), |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 738 | 2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 739 | else |
| 740 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 741 | ar9300Common_rx_gain_table_2p2, |
| 742 | ARRAY_SIZE(ar9300Common_rx_gain_table_2p2), |
| 743 | 2); |
| 744 | } |
| 745 | |
| 746 | static void ar9003_rx_gain_table_mode1(struct ath_hw *ah) |
| 747 | { |
| 748 | if (AR_SREV_9330_12(ah)) |
| 749 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 750 | ar9331_common_wo_xlna_rx_gain_1p2, |
| 751 | ARRAY_SIZE(ar9331_common_wo_xlna_rx_gain_1p2), |
| 752 | 2); |
| 753 | else if (AR_SREV_9330_11(ah)) |
| 754 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 755 | ar9331_common_wo_xlna_rx_gain_1p1, |
| 756 | ARRAY_SIZE(ar9331_common_wo_xlna_rx_gain_1p1), |
| 757 | 2); |
| 758 | else if (AR_SREV_9340(ah)) |
| 759 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 760 | ar9340Common_wo_xlna_rx_gain_table_1p0, |
| 761 | ARRAY_SIZE(ar9340Common_wo_xlna_rx_gain_table_1p0), |
| 762 | 2); |
| 763 | else if (AR_SREV_9485_11(ah)) |
| 764 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 765 | ar9485Common_wo_xlna_rx_gain_1_1, |
| 766 | ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1), |
| 767 | 2); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 768 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 769 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 770 | ar9462_common_wo_xlna_rx_gain_table_2p0, |
| 771 | ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_2p0), |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 772 | 2); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 773 | else if (AR_SREV_9550(ah)) { |
| 774 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 775 | ar955x_1p0_common_wo_xlna_rx_gain_table, |
| 776 | ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_table), |
| 777 | 2); |
| 778 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
| 779 | ar955x_1p0_common_wo_xlna_rx_gain_bounds, |
| 780 | ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_bounds), |
| 781 | 5); |
| 782 | } else if (AR_SREV_9580(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 783 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 784 | ar9580_1p0_wo_xlna_rx_gain_table, |
| 785 | ARRAY_SIZE(ar9580_1p0_wo_xlna_rx_gain_table), |
| 786 | 2); |
| 787 | else |
| 788 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 789 | ar9300Common_wo_xlna_rx_gain_table_2p2, |
| 790 | ARRAY_SIZE(ar9300Common_wo_xlna_rx_gain_table_2p2), |
| 791 | 2); |
| 792 | } |
| 793 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 794 | static void ar9003_rx_gain_table_mode2(struct ath_hw *ah) |
| 795 | { |
Sujith Manoharan | c91ec46 | 2012-02-22 12:40:03 +0530 | [diff] [blame] | 796 | if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 797 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | c91ec46 | 2012-02-22 12:40:03 +0530 | [diff] [blame] | 798 | ar9462_common_mixed_rx_gain_table_2p0, |
| 799 | ARRAY_SIZE(ar9462_common_mixed_rx_gain_table_2p0), 2); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 800 | } |
| 801 | |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 802 | static void ar9003_rx_gain_table_apply(struct ath_hw *ah) |
| 803 | { |
| 804 | switch (ar9003_hw_get_rx_gain_idx(ah)) { |
| 805 | case 0: |
| 806 | default: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 807 | ar9003_rx_gain_table_mode0(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 808 | break; |
| 809 | case 1: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 810 | ar9003_rx_gain_table_mode1(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 811 | break; |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 812 | case 2: |
| 813 | ar9003_rx_gain_table_mode2(ah); |
| 814 | break; |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 815 | } |
| 816 | } |
| 817 | |
| 818 | /* set gain table pointers according to values read from the eeprom */ |
| 819 | static void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah) |
| 820 | { |
| 821 | ar9003_tx_gain_table_apply(ah); |
| 822 | ar9003_rx_gain_table_apply(ah); |
| 823 | } |
| 824 | |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 825 | /* |
| 826 | * Helper for ASPM support. |
| 827 | * |
| 828 | * Disable PLL when in L0s as well as receiver clock when in L1. |
| 829 | * This power saving option must be enabled through the SerDes. |
| 830 | * |
| 831 | * Programming the SerDes must go through the same 288 bit serial shift |
| 832 | * register as the other analog registers. Hence the 9 writes. |
| 833 | */ |
| 834 | static void ar9003_hw_configpcipowersave(struct ath_hw *ah, |
Stanislaw Gruszka | 84c87dc | 2011-08-05 13:10:32 +0200 | [diff] [blame] | 835 | bool power_off) |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 836 | { |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 837 | /* Nothing to do on restore for 11N */ |
Stanislaw Gruszka | 84c87dc | 2011-08-05 13:10:32 +0200 | [diff] [blame] | 838 | if (!power_off /* !restore */) { |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 839 | /* set bit 19 to allow forcing of pcie core into L1 state */ |
| 840 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); |
| 841 | |
| 842 | /* Several PCIe massages to ensure proper behaviour */ |
| 843 | if (ah->config.pcie_waen) |
| 844 | REG_WRITE(ah, AR_WA, ah->config.pcie_waen); |
Luis R. Rodriguez | 9a658d2 | 2010-06-21 18:38:47 -0400 | [diff] [blame] | 845 | else |
| 846 | REG_WRITE(ah, AR_WA, ah->WARegVal); |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 847 | } |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 848 | |
| 849 | /* |
| 850 | * Configire PCIE after Ini init. SERDES values now come from ini file |
| 851 | * This enables PCIe low power mode. |
| 852 | */ |
Luis R. Rodriguez | 6a0ec30 | 2010-06-21 18:38:49 -0400 | [diff] [blame] | 853 | if (ah->config.pcieSerDesWrite) { |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 854 | unsigned int i; |
Luis R. Rodriguez | d5c4d19 | 2010-06-21 18:38:50 -0400 | [diff] [blame] | 855 | struct ar5416IniArray *array; |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 856 | |
Luis R. Rodriguez | d5c4d19 | 2010-06-21 18:38:50 -0400 | [diff] [blame] | 857 | array = power_off ? &ah->iniPcieSerdes : |
| 858 | &ah->iniPcieSerdesLowPower; |
| 859 | |
| 860 | for (i = 0; i < array->ia_rows; i++) { |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 861 | REG_WRITE(ah, |
Luis R. Rodriguez | d5c4d19 | 2010-06-21 18:38:50 -0400 | [diff] [blame] | 862 | INI_RA(array, i, 0), |
| 863 | INI_RA(array, i, 1)); |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 864 | } |
| 865 | } |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 866 | } |
| 867 | |
| 868 | /* Sets up the AR9003 hardware familiy callbacks */ |
| 869 | void ar9003_hw_attach_ops(struct ath_hw *ah) |
| 870 | { |
| 871 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
| 872 | struct ath_hw_ops *ops = ath9k_hw_ops(ah); |
| 873 | |
| 874 | priv_ops->init_mode_regs = ar9003_hw_init_mode_regs; |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 875 | priv_ops->init_mode_gain_regs = ar9003_hw_init_mode_gain_regs; |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 876 | |
| 877 | ops->config_pci_powersave = ar9003_hw_configpcipowersave; |
| 878 | |
| 879 | ar9003_hw_attach_phy_ops(ah); |
| 880 | ar9003_hw_attach_calib_ops(ah); |
| 881 | ar9003_hw_attach_mac_ops(ah); |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 882 | } |