Skip to content

Commit 1a63e2c

Browse files
Vivek Natarajanlinvjw
authored andcommitted
ath9k_hw: Updates for AR9485 1.1 chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 8354dd3 commit 1a63e2c

3 files changed

Lines changed: 1246 additions & 11 deletions

File tree

‎drivers/net/wireless/ath/ath9k/ar9003_hw.c‎

Lines changed: 101 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,67 @@
2828
*/
2929
static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
3030
{
31-
if (AR_SREV_9485(ah)) {
31+
if (AR_SREV_9485_11(ah)) {
32+
/* mac */
33+
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
34+
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
35+
ar9485_1_1_mac_core,
36+
ARRAY_SIZE(ar9485_1_1_mac_core), 2);
37+
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
38+
ar9485_1_1_mac_postamble,
39+
ARRAY_SIZE(ar9485_1_1_mac_postamble), 5);
40+
41+
/* bb */
42+
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], ar9485_1_1,
43+
ARRAY_SIZE(ar9485_1_1), 2);
44+
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
45+
ar9485_1_1_baseband_core,
46+
ARRAY_SIZE(ar9485_1_1_baseband_core), 2);
47+
INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
48+
ar9485_1_1_baseband_postamble,
49+
ARRAY_SIZE(ar9485_1_1_baseband_postamble), 5);
50+
51+
/* radio */
52+
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
53+
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
54+
ar9485_1_1_radio_core,
55+
ARRAY_SIZE(ar9485_1_1_radio_core), 2);
56+
INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
57+
ar9485_1_1_radio_postamble,
58+
ARRAY_SIZE(ar9485_1_1_radio_postamble), 2);
59+
60+
/* soc */
61+
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
62+
ar9485_1_1_soc_preamble,
63+
ARRAY_SIZE(ar9485_1_1_soc_preamble), 2);
64+
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
65+
INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], NULL, 0, 0);
66+
67+
/* rx/tx gain */
68+
INIT_INI_ARRAY(&ah->iniModesRxGain,
69+
ar9485_common_rx_gain_1_1,
70+
ARRAY_SIZE(ar9485_common_rx_gain_1_1), 2);
71+
INIT_INI_ARRAY(&ah->iniModesTxGain,
72+
ar9485_modes_lowest_ob_db_tx_gain_1_1,
73+
ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1),
74+
5);
75+
76+
/* Load PCIE SERDES settings from INI */
77+
78+
/* Awake Setting */
79+
80+
INIT_INI_ARRAY(&ah->iniPcieSerdes,
81+
ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1,
82+
ARRAY_SIZE(ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1),
83+
2);
84+
85+
/* Sleep Setting */
86+
87+
INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
88+
ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1,
89+
ARRAY_SIZE(ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1),
90+
2);
91+
} else if (AR_SREV_9485(ah)) {
3292
/* mac */
3393
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
3494
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
@@ -85,8 +145,8 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
85145
/* Sleep Setting */
86146

87147
INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower,
88-
ar9485_1_0_pcie_phy_pll_on_clkreq_enable_L1,
89-
ARRAY_SIZE(ar9485_1_0_pcie_phy_pll_on_clkreq_enable_L1),
148+
ar9485_1_0_pcie_phy_pll_on_clkreq_disable_L1,
149+
ARRAY_SIZE(ar9485_1_0_pcie_phy_pll_on_clkreq_disable_L1),
90150
2);
91151
} else {
92152
/* mac */
@@ -163,7 +223,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
163223
switch (ar9003_hw_get_tx_gain_idx(ah)) {
164224
case 0:
165225
default:
166-
if (AR_SREV_9485(ah))
226+
if (AR_SREV_9485_11(ah))
227+
INIT_INI_ARRAY(&ah->iniModesTxGain,
228+
ar9485_modes_lowest_ob_db_tx_gain_1_1,
229+
ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1),
230+
5);
231+
else if (AR_SREV_9485(ah))
167232
INIT_INI_ARRAY(&ah->iniModesTxGain,
168233
ar9485Modes_lowest_ob_db_tx_gain_1_0,
169234
ARRAY_SIZE(ar9485Modes_lowest_ob_db_tx_gain_1_0),
@@ -175,10 +240,15 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
175240
5);
176241
break;
177242
case 1:
178-
if (AR_SREV_9485(ah))
243+
if (AR_SREV_9485_11(ah))
244+
INIT_INI_ARRAY(&ah->iniModesTxGain,
245+
ar9485Modes_high_ob_db_tx_gain_1_1,
246+
ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_1),
247+
5);
248+
else if (AR_SREV_9485(ah))
179249
INIT_INI_ARRAY(&ah->iniModesTxGain,
180250
ar9485Modes_high_ob_db_tx_gain_1_0,
181-
ARRAY_SIZE(ar9485Modes_lowest_ob_db_tx_gain_1_0),
251+
ARRAY_SIZE(ar9485Modes_high_ob_db_tx_gain_1_0),
182252
5);
183253
else
184254
INIT_INI_ARRAY(&ah->iniModesTxGain,
@@ -187,10 +257,15 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
187257
5);
188258
break;
189259
case 2:
190-
if (AR_SREV_9485(ah))
260+
if (AR_SREV_9485_11(ah))
261+
INIT_INI_ARRAY(&ah->iniModesTxGain,
262+
ar9485Modes_low_ob_db_tx_gain_1_1,
263+
ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_1),
264+
5);
265+
else if (AR_SREV_9485(ah))
191266
INIT_INI_ARRAY(&ah->iniModesTxGain,
192267
ar9485Modes_low_ob_db_tx_gain_1_0,
193-
ARRAY_SIZE(ar9485Modes_lowest_ob_db_tx_gain_1_0),
268+
ARRAY_SIZE(ar9485Modes_low_ob_db_tx_gain_1_0),
194269
5);
195270
else
196271
INIT_INI_ARRAY(&ah->iniModesTxGain,
@@ -199,7 +274,12 @@ static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
199274
5);
200275
break;
201276
case 3:
202-
if (AR_SREV_9485(ah))
277+
if (AR_SREV_9485_11(ah))
278+
INIT_INI_ARRAY(&ah->iniModesTxGain,
279+
ar9485Modes_high_power_tx_gain_1_1,
280+
ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_1),
281+
5);
282+
else if (AR_SREV_9485(ah))
203283
INIT_INI_ARRAY(&ah->iniModesTxGain,
204284
ar9485Modes_high_power_tx_gain_1_0,
205285
ARRAY_SIZE(ar9485Modes_high_power_tx_gain_1_0),
@@ -218,7 +298,12 @@ static void ar9003_rx_gain_table_apply(struct ath_hw *ah)
218298
switch (ar9003_hw_get_rx_gain_idx(ah)) {
219299
case 0:
220300
default:
221-
if (AR_SREV_9485(ah))
301+
if (AR_SREV_9485_11(ah))
302+
INIT_INI_ARRAY(&ah->iniModesRxGain,
303+
ar9485_common_rx_gain_1_1,
304+
ARRAY_SIZE(ar9485_common_rx_gain_1_1),
305+
2);
306+
else if (AR_SREV_9485(ah))
222307
INIT_INI_ARRAY(&ah->iniModesRxGain,
223308
ar9485Common_rx_gain_1_0,
224309
ARRAY_SIZE(ar9485Common_rx_gain_1_0),
@@ -230,7 +315,12 @@ static void ar9003_rx_gain_table_apply(struct ath_hw *ah)
230315
2);
231316
break;
232317
case 1:
233-
if (AR_SREV_9485(ah))
318+
if (AR_SREV_9485_11(ah))
319+
INIT_INI_ARRAY(&ah->iniModesRxGain,
320+
ar9485Common_wo_xlna_rx_gain_1_1,
321+
ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1),
322+
2);
323+
else if (AR_SREV_9485(ah))
234324
INIT_INI_ARRAY(&ah->iniModesRxGain,
235325
ar9485Common_wo_xlna_rx_gain_1_0,
236326
ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_0),

0 commit comments

Comments
 (0)