diff options
| author | Miaoqing Pan <miaoqing@codeaurora.org> | 2016-03-06 21:38:20 -0500 |
|---|---|---|
| committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-03-11 07:00:03 -0500 |
| commit | dfcf02cd2998e2240b2bc7b4f4412578b8070bdb (patch) | |
| tree | 8ae509cd4288042d9990a613a195fcd257291401 /drivers/net | |
| parent | 668ae0a3e48ac6811f431915b466514bf167e2f4 (diff) | |
ath9k: fix BTCoex access invalid registers for SOC chips
The registers of AR_GPIO_INPUT_MUX1 and AR_GPIO_PDPU were removed
from SOC chips, fix invalid accessing
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 95a810ba98ac..d46cd319d524 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c | |||
| @@ -162,9 +162,10 @@ void ath9k_hw_btcoex_init_2wire(struct ath_hw *ah) | |||
| 162 | AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB); | 162 | AR_GPIO_INPUT_EN_VAL_BT_ACTIVE_BB); |
| 163 | 163 | ||
| 164 | /* Set input mux for bt_active to gpio pin */ | 164 | /* Set input mux for bt_active to gpio pin */ |
| 165 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, | 165 | if (!AR_SREV_SOC(ah)) |
| 166 | AR_GPIO_INPUT_MUX1_BT_ACTIVE, | 166 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, |
| 167 | btcoex_hw->btactive_gpio); | 167 | AR_GPIO_INPUT_MUX1_BT_ACTIVE, |
| 168 | btcoex_hw->btactive_gpio); | ||
| 168 | 169 | ||
| 169 | /* Configure the desired gpio port for input */ | 170 | /* Configure the desired gpio port for input */ |
| 170 | ath9k_hw_gpio_request_in(ah, btcoex_hw->btactive_gpio, | 171 | ath9k_hw_gpio_request_in(ah, btcoex_hw->btactive_gpio, |
| @@ -183,13 +184,14 @@ void ath9k_hw_btcoex_init_3wire(struct ath_hw *ah) | |||
| 183 | 184 | ||
| 184 | /* Set input mux for bt_prority_async and | 185 | /* Set input mux for bt_prority_async and |
| 185 | * bt_active_async to GPIO pins */ | 186 | * bt_active_async to GPIO pins */ |
| 186 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, | 187 | if (!AR_SREV_SOC(ah)) { |
| 187 | AR_GPIO_INPUT_MUX1_BT_ACTIVE, | 188 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, |
| 188 | btcoex_hw->btactive_gpio); | 189 | AR_GPIO_INPUT_MUX1_BT_ACTIVE, |
| 189 | 190 | btcoex_hw->btactive_gpio); | |
| 190 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, | 191 | REG_RMW_FIELD(ah, AR_GPIO_INPUT_MUX1, |
| 191 | AR_GPIO_INPUT_MUX1_BT_PRIORITY, | 192 | AR_GPIO_INPUT_MUX1_BT_PRIORITY, |
| 192 | btcoex_hw->btpriority_gpio); | 193 | btcoex_hw->btpriority_gpio); |
| 194 | } | ||
| 193 | 195 | ||
| 194 | /* Configure the desired GPIO ports for input */ | 196 | /* Configure the desired GPIO ports for input */ |
| 195 | ath9k_hw_gpio_request_in(ah, btcoex_hw->btactive_gpio, | 197 | ath9k_hw_gpio_request_in(ah, btcoex_hw->btactive_gpio, |
| @@ -285,13 +287,13 @@ void ath9k_hw_btcoex_set_weight(struct ath_hw *ah, | |||
| 285 | txprio_shift[i-1]); | 287 | txprio_shift[i-1]); |
| 286 | } | 288 | } |
| 287 | } | 289 | } |
| 290 | |||
| 288 | /* Last WLAN weight has to be adjusted wrt tx priority */ | 291 | /* Last WLAN weight has to be adjusted wrt tx priority */ |
| 289 | if (concur_tx) { | 292 | if (concur_tx) { |
| 290 | btcoex_hw->wlan_weight[i-1] &= ~(0xff << txprio_shift[i-1]); | 293 | btcoex_hw->wlan_weight[i-1] &= ~(0xff << txprio_shift[i-1]); |
| 291 | btcoex_hw->wlan_weight[i-1] |= (btcoex_hw->tx_prio[stomp_type] | 294 | btcoex_hw->wlan_weight[i-1] |= (btcoex_hw->tx_prio[stomp_type] |
| 292 | << txprio_shift[i-1]); | 295 | << txprio_shift[i-1]); |
| 293 | } | 296 | } |
| 294 | |||
| 295 | } | 297 | } |
| 296 | EXPORT_SYMBOL(ath9k_hw_btcoex_set_weight); | 298 | EXPORT_SYMBOL(ath9k_hw_btcoex_set_weight); |
| 297 | 299 | ||
| @@ -375,7 +377,8 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah) | |||
| 375 | break; | 377 | break; |
| 376 | } | 378 | } |
| 377 | 379 | ||
| 378 | if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_MCI) { | 380 | if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_MCI && |
| 381 | !AR_SREV_SOC(ah)) { | ||
| 379 | REG_RMW(ah, AR_GPIO_PDPU, | 382 | REG_RMW(ah, AR_GPIO_PDPU, |
| 380 | (0x2 << (btcoex_hw->btactive_gpio * 2)), | 383 | (0x2 << (btcoex_hw->btactive_gpio * 2)), |
| 381 | (0x3 << (btcoex_hw->btactive_gpio * 2))); | 384 | (0x3 << (btcoex_hw->btactive_gpio * 2))); |
