aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorVivek Natarajan <vnatarajan@atheros.com>2011-01-27 04:15:07 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:44:28 -0500
commitb141581923ab4904052174e3b4eb17cc3ce8632c (patch)
tree7b6249510e86a8e72cc10c73ab8e6eeecb631917 /drivers/net/wireless/ath/ath9k/hw.c
parent74f7635930bb157b2e83d38a68177a2b28138ead (diff)
ath9k_hw: Add a function to read sqsum_dvc.
Add a function to observe the delta VC of BB_PLL. For a good chip, the sqsum_dvc is below 2000. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 48d121c24eb..0e64d766605 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -668,6 +668,19 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
668 REGWRITE_BUFFER_FLUSH(ah); 668 REGWRITE_BUFFER_FLUSH(ah);
669} 669}
670 670
671unsigned long ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
672{
673 REG_WRITE(ah, PLL3, (REG_READ(ah, PLL3) & ~(PLL3_DO_MEAS_MASK)));
674 udelay(100);
675 REG_WRITE(ah, PLL3, (REG_READ(ah, PLL3) | PLL3_DO_MEAS_MASK));
676
677 while ((REG_READ(ah, PLL4) & PLL4_MEAS_DONE) == 0)
678 udelay(100);
679
680 return (REG_READ(ah, PLL3) & SQSUM_DVC_MASK) >> 3;
681}
682EXPORT_SYMBOL(ar9003_get_pll_sqsum_dvc);
683
671static void ath9k_hw_init_pll(struct ath_hw *ah, 684static void ath9k_hw_init_pll(struct ath_hw *ah,
672 struct ath9k_channel *chan) 685 struct ath9k_channel *chan)
673{ 686{