aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qualcomm.com>2012-09-09 23:50:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 15:31:37 -0400
commita4a2954ff49e72ce3fa1f78a156b2492a023c89d (patch)
tree677798b1d03f9e692443b2041ae0fd1f552a4d78 /drivers/net/wireless/ath/ath9k/hw.c
parentaaa53ee97dab2b4c98ea2765e4f16af62d8694bb (diff)
ath9k_hw: Add AR9565 HW support
Various parts of the code require AR9565 checks, this patch adds them. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.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.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 36386265b8ab..6539d2acb5e8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -602,6 +602,11 @@ static int __ath9k_hw_init(struct ath_hw *ah)
602 if (AR_SREV_9462(ah)) 602 if (AR_SREV_9462(ah))
603 ah->WARegVal &= ~AR_WA_D3_L1_DISABLE; 603 ah->WARegVal &= ~AR_WA_D3_L1_DISABLE;
604 604
605 if (AR_SREV_9565(ah)) {
606 ah->WARegVal |= AR_WA_BIT22;
607 REG_WRITE(ah, AR_WA, ah->WARegVal);
608 }
609
605 ath9k_hw_init_defaults(ah); 610 ath9k_hw_init_defaults(ah);
606 ath9k_hw_init_config(ah); 611 ath9k_hw_init_config(ah);
607 612
@@ -802,8 +807,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,
802{ 807{
803 u32 pll; 808 u32 pll;
804 809
805 if (AR_SREV_9485(ah)) { 810 if (AR_SREV_9485(ah) || AR_SREV_9565(ah)) {
806
807 /* program BB PLL ki and kd value, ki=0x4, kd=0x40 */ 811 /* program BB PLL ki and kd value, ki=0x4, kd=0x40 */
808 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2, 812 REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2,
809 AR_CH0_BB_DPLL2_PLL_PWD, 0x1); 813 AR_CH0_BB_DPLL2_PLL_PWD, 0x1);
@@ -2036,7 +2040,7 @@ static void ath9k_set_power_sleep(struct ath_hw *ah)
2036{ 2040{
2037 REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); 2041 REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);
2038 2042
2039 if (AR_SREV_9462(ah)) { 2043 if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
2040 REG_CLR_BIT(ah, AR_TIMER_MODE, 0xff); 2044 REG_CLR_BIT(ah, AR_TIMER_MODE, 0xff);
2041 REG_CLR_BIT(ah, AR_NDP2_TIMER_MODE, 0xff); 2045 REG_CLR_BIT(ah, AR_NDP2_TIMER_MODE, 0xff);
2042 REG_CLR_BIT(ah, AR_SLP32_INC, 0xfffff); 2046 REG_CLR_BIT(ah, AR_SLP32_INC, 0xfffff);
@@ -2491,7 +2495,7 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2491 2495
2492 if (AR_SREV_9300_20_OR_LATER(ah)) { 2496 if (AR_SREV_9300_20_OR_LATER(ah)) {
2493 pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_FASTCLOCK; 2497 pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_FASTCLOCK;
2494 if (!AR_SREV_9330(ah) && !AR_SREV_9485(ah)) 2498 if (!AR_SREV_9330(ah) && !AR_SREV_9485(ah) && !AR_SREV_9565(ah))
2495 pCap->hw_caps |= ATH9K_HW_CAP_LDPC; 2499 pCap->hw_caps |= ATH9K_HW_CAP_LDPC;
2496 2500
2497 pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH; 2501 pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH;
@@ -2574,14 +2578,12 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2574 ah->enabled_cals |= TX_IQ_ON_AGC_CAL; 2578 ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
2575 } 2579 }
2576 2580
2577 if (AR_SREV_9462(ah)) { 2581 if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
2578
2579 if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE)) 2582 if (!(ah->ent_mode & AR_ENT_OTP_49GHZ_DISABLE))
2580 pCap->hw_caps |= ATH9K_HW_CAP_MCI; 2583 pCap->hw_caps |= ATH9K_HW_CAP_MCI;
2581 2584
2582 if (AR_SREV_9462_20(ah)) 2585 if (AR_SREV_9462_20(ah))
2583 pCap->hw_caps |= ATH9K_HW_CAP_RTT; 2586 pCap->hw_caps |= ATH9K_HW_CAP_RTT;
2584
2585 } 2587 }
2586 2588
2587 2589
@@ -2747,7 +2749,7 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
2747 2749
2748 ENABLE_REGWRITE_BUFFER(ah); 2750 ENABLE_REGWRITE_BUFFER(ah);
2749 2751
2750 if (AR_SREV_9462(ah)) 2752 if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
2751 bits |= ATH9K_RX_FILTER_CONTROL_WRAPPER; 2753 bits |= ATH9K_RX_FILTER_CONTROL_WRAPPER;
2752 2754
2753 REG_WRITE(ah, AR_RX_FILTER, bits); 2755 REG_WRITE(ah, AR_RX_FILTER, bits);
@@ -3044,7 +3046,7 @@ void ath9k_hw_gen_timer_start(struct ath_hw *ah,
3044 REG_SET_BIT(ah, gen_tmr_configuration[timer->index].mode_addr, 3046 REG_SET_BIT(ah, gen_tmr_configuration[timer->index].mode_addr,
3045 gen_tmr_configuration[timer->index].mode_mask); 3047 gen_tmr_configuration[timer->index].mode_mask);
3046 3048
3047 if (AR_SREV_9462(ah)) { 3049 if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) {
3048 /* 3050 /*
3049 * Starting from AR9462, each generic timer can select which tsf 3051 * Starting from AR9462, each generic timer can select which tsf
3050 * to use. But we still follow the old rule, 0 - 7 use tsf and 3052 * to use. But we still follow the old rule, 0 - 7 use tsf and