aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 9840e005108..99c90f71576 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -733,6 +733,39 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,
733 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, 733 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2,
734 AR_CH0_BB_DPLL2_PLL_PWD, 0x0); 734 AR_CH0_BB_DPLL2_PLL_PWD, 0x0);
735 udelay(1000); 735 udelay(1000);
736 } else if (AR_SREV_9330(ah)) {
737 u32 ddr_dpll2, pll_control2, kd;
738
739 if (ah->is_clk_25mhz) {
740 ddr_dpll2 = 0x18e82f01;
741 pll_control2 = 0xe04a3d;
742 kd = 0x1d;
743 } else {
744 ddr_dpll2 = 0x19e82f01;
745 pll_control2 = 0x886666;
746 kd = 0x3d;
747 }
748
749 /* program DDR PLL ki and kd value */
750 REG_WRITE(ah, AR_CH0_DDR_DPLL2, ddr_dpll2);
751
752 /* program DDR PLL phase_shift */
753 REG_RMW_FIELD(ah, AR_CH0_DDR_DPLL3,
754 AR_CH0_DPLL3_PHASE_SHIFT, 0x1);
755
756 REG_WRITE(ah, AR_RTC_PLL_CONTROL, 0x1142c);
757 udelay(1000);
758
759 /* program refdiv, nint, frac to RTC register */
760 REG_WRITE(ah, AR_RTC_PLL_CONTROL2, pll_control2);
761
762 /* program BB PLL kd and ki value */
763 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, AR_CH0_DPLL2_KD, kd);
764 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, AR_CH0_DPLL2_KI, 0x06);
765
766 /* program BB PLL phase_shift */
767 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL3,
768 AR_CH0_BB_DPLL3_PHASE_SHIFT, 0x1);
736 } else if (AR_SREV_9340(ah)) { 769 } else if (AR_SREV_9340(ah)) {
737 u32 regval, pll2_divint, pll2_divfrac, refdiv; 770 u32 regval, pll2_divint, pll2_divfrac, refdiv;
738 771
@@ -774,7 +807,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,
774 807
775 REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll); 808 REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
776 809
777 if (AR_SREV_9485(ah) || AR_SREV_9340(ah)) 810 if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
778 udelay(1000); 811 udelay(1000);
779 812
780 /* Switch the core clock for ar9271 to 117Mhz */ 813 /* Switch the core clock for ar9271 to 117Mhz */