1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -742,6 +742,39 @@ static void ath9k_hw_init_pll(struct ath
4 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2,
5 AR_CH0_BB_DPLL2_PLL_PWD, 0x0);
7 + } else if (AR_SREV_9330(ah)) {
8 + u32 ddr_dpll2, pll_control2, kd;
10 + if (ah->is_clk_25mhz) {
11 + ddr_dpll2 = 0x18e82f01;
12 + pll_control2 = 0xe04a3d;
15 + ddr_dpll2 = 0x19e82f01;
16 + pll_control2 = 0x886666;
20 + /* program DDR PLL ki and kd value */
21 + REG_WRITE(ah, AR_CH0_DDR_DPLL2, ddr_dpll2);
23 + /* program DDR PLL phase_shift */
24 + REG_RMW_FIELD(ah, AR_CH0_DDR_DPLL3,
25 + AR_CH0_DPLL3_PHASE_SHIFT, 0x1);
27 + REG_WRITE(ah, AR_RTC_PLL_CONTROL, 0x1142c);
30 + /* program refdiv, nint, frac to RTC register */
31 + REG_WRITE(ah, AR_RTC_PLL_CONTROL2, pll_control2);
33 + /* program BB PLL kd and ki value */
34 + REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, AR_CH0_DPLL2_KD, kd);
35 + REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, AR_CH0_DPLL2_KI, 0x06);
37 + /* program BB PLL phase_shift */
38 + REG_RMW_FIELD(ah, AR_CH0_BB_DPLL3,
39 + AR_CH0_BB_DPLL3_PHASE_SHIFT, 0x1);
40 } else if (AR_SREV_9340(ah)) {
41 u32 regval, pll2_divint, pll2_divfrac, refdiv;
43 @@ -783,7 +816,7 @@ static void ath9k_hw_init_pll(struct ath
45 REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
47 - if (AR_SREV_9485(ah) || AR_SREV_9340(ah))
48 + if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
51 /* Switch the core clock for ar9271 to 117Mhz */