Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 1 | /* |
Sujith Manoharan | 5b68138 | 2011-05-17 13:36:18 +0530 | [diff] [blame] | 2 | * Copyright (c) 2008-2011 Atheros Communications Inc. |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 3 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any |
| 5 | * purpose with or without fee is hereby granted, provided that the above |
| 6 | * copyright notice and this permission notice appear in all copies. |
| 7 | * |
| 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 15 | */ |
| 16 | |
| 17 | #include "hw.h" |
Luis R. Rodriguez | b622a72 | 2010-04-15 17:39:28 -0400 | [diff] [blame] | 18 | #include "ar9003_mac.h" |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 19 | #include "ar9003_2p2_initvals.h" |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 20 | #include "ar9485_initvals.h" |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 21 | #include "ar9340_initvals.h" |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 22 | #include "ar9330_1p1_initvals.h" |
| 23 | #include "ar9330_1p2_initvals.h" |
Gabor Juhos | a0fbb9b | 2012-07-03 19:13:22 +0200 | [diff] [blame] | 24 | #include "ar955x_1p0_initvals.h" |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 25 | #include "ar9580_1p0_initvals.h" |
Rajkumar Manoharan | 76db2f8 | 2011-10-13 11:00:43 +0530 | [diff] [blame] | 26 | #include "ar9462_2p0_initvals.h" |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 27 | #include "ar9462_2p1_initvals.h" |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 28 | #include "ar9565_1p0_initvals.h" |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 29 | #include "ar9565_1p1_initvals.h" |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 30 | |
| 31 | /* General hardware code for the AR9003 hadware family */ |
| 32 | |
Luis R. Rodriguez | 886b42b | 2010-10-14 11:44:27 -0700 | [diff] [blame] | 33 | /* |
| 34 | * The AR9003 family uses a new INI format (pre, core, post |
| 35 | * arrays per subsystem). This provides support for the |
| 36 | * AR9003 2.2 chipsets. |
| 37 | */ |
| 38 | static void ar9003_hw_init_mode_regs(struct ath_hw *ah) |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 39 | { |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 40 | if (AR_SREV_9330_11(ah)) { |
| 41 | /* mac */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 42 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 43 | ar9331_1p1_mac_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 44 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 45 | ar9331_1p1_mac_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 46 | |
| 47 | /* bb */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 48 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 49 | ar9331_1p1_baseband_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 50 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 51 | ar9331_1p1_baseband_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 52 | |
| 53 | /* radio */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 54 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 55 | ar9331_1p1_radio_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 56 | |
| 57 | /* soc */ |
| 58 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 59 | ar9331_1p1_soc_preamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 60 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 61 | ar9331_1p1_soc_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 62 | |
| 63 | /* rx/tx gain */ |
| 64 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 65 | ar9331_common_rx_gain_1p1); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 66 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 67 | ar9331_modes_lowest_ob_db_tx_gain_1p1); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 68 | |
Sujith Manoharan | 57527f8 | 2012-11-13 11:33:53 +0530 | [diff] [blame] | 69 | /* Japan 2484 Mhz CCK */ |
| 70 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 71 | ar9331_1p1_baseband_core_txfir_coeff_japan_2484); |
| 72 | |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 73 | /* additional clock settings */ |
| 74 | if (ah->is_clk_25mhz) |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 75 | INIT_INI_ARRAY(&ah->iniAdditional, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 76 | ar9331_1p1_xtal_25M); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 77 | else |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 78 | INIT_INI_ARRAY(&ah->iniAdditional, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 79 | ar9331_1p1_xtal_40M); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 80 | } else if (AR_SREV_9330_12(ah)) { |
| 81 | /* mac */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 82 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 83 | ar9331_1p2_mac_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 84 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 85 | ar9331_1p2_mac_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 86 | |
| 87 | /* bb */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 88 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 89 | ar9331_1p2_baseband_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 90 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 91 | ar9331_1p2_baseband_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 92 | |
| 93 | /* radio */ |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 94 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 95 | ar9331_1p2_radio_core); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 96 | |
| 97 | /* soc */ |
| 98 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 99 | ar9331_1p2_soc_preamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 100 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 101 | ar9331_1p2_soc_postamble); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 102 | |
| 103 | /* rx/tx gain */ |
| 104 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 105 | ar9331_common_rx_gain_1p2); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 106 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 107 | ar9331_modes_lowest_ob_db_tx_gain_1p2); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 108 | |
Sujith Manoharan | 57527f8 | 2012-11-13 11:33:53 +0530 | [diff] [blame] | 109 | /* Japan 2484 Mhz CCK */ |
| 110 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 111 | ar9331_1p2_baseband_core_txfir_coeff_japan_2484); |
| 112 | |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 113 | /* additional clock settings */ |
| 114 | if (ah->is_clk_25mhz) |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 115 | INIT_INI_ARRAY(&ah->iniAdditional, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 116 | ar9331_1p2_xtal_25M); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 117 | else |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 118 | INIT_INI_ARRAY(&ah->iniAdditional, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 119 | ar9331_1p2_xtal_40M); |
Gabor Juhos | 172805a | 2011-06-21 11:23:26 +0200 | [diff] [blame] | 120 | } else if (AR_SREV_9340(ah)) { |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 121 | /* mac */ |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 122 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 123 | ar9340_1p0_mac_core); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 124 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 125 | ar9340_1p0_mac_postamble); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 126 | |
| 127 | /* bb */ |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 128 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 129 | ar9340_1p0_baseband_core); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 130 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 131 | ar9340_1p0_baseband_postamble); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 132 | |
| 133 | /* radio */ |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 134 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 135 | ar9340_1p0_radio_core); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 136 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 137 | ar9340_1p0_radio_postamble); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 138 | |
| 139 | /* soc */ |
| 140 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 141 | ar9340_1p0_soc_preamble); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 142 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 143 | ar9340_1p0_soc_postamble); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 144 | |
| 145 | /* rx/tx gain */ |
| 146 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 147 | ar9340Common_wo_xlna_rx_gain_table_1p0); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 148 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 149 | ar9340Modes_high_ob_db_tx_gain_table_1p0); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 150 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 151 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 152 | ar9340Modes_fast_clock_1p0); |
Vasanthakumar Thiagarajan | d89baac | 2011-04-19 19:29:04 +0530 | [diff] [blame] | 153 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 154 | if (!ah->is_clk_25mhz) |
| 155 | INIT_INI_ARRAY(&ah->iniAdditional, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 156 | ar9340_1p0_radio_core_40M); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 157 | } else if (AR_SREV_9485_11_OR_LATER(ah)) { |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 158 | /* mac */ |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 159 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 160 | ar9485_1_1_mac_core); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 161 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 162 | ar9485_1_1_mac_postamble); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 163 | |
| 164 | /* bb */ |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 165 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], ar9485_1_1); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 166 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 167 | ar9485_1_1_baseband_core); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 168 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 169 | ar9485_1_1_baseband_postamble); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 170 | |
| 171 | /* radio */ |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 172 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 173 | ar9485_1_1_radio_core); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 174 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 175 | ar9485_1_1_radio_postamble); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 176 | |
| 177 | /* soc */ |
| 178 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 179 | ar9485_1_1_soc_preamble); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 180 | |
| 181 | /* rx/tx gain */ |
| 182 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 183 | ar9485Common_wo_xlna_rx_gain_1_1); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 184 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 185 | ar9485_modes_lowest_ob_db_tx_gain_1_1); |
Vivek Natarajan | 1a63e2c | 2011-02-18 16:49:47 +0530 | [diff] [blame] | 186 | |
Sujith Manoharan | 57527f8 | 2012-11-13 11:33:53 +0530 | [diff] [blame] | 187 | /* Japan 2484 Mhz CCK */ |
| 188 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 189 | ar9485_1_1_baseband_core_txfir_coeff_japan_2484); |
| 190 | |
Sujith Manoharan | 2d22c7d | 2013-11-08 11:45:25 +0530 | [diff] [blame] | 191 | if (ah->config.no_pll_pwrsave) { |
| 192 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 193 | ar9485_1_1_pcie_phy_clkreq_disable_L1); |
| 194 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
| 195 | ar9485_1_1_pcie_phy_clkreq_disable_L1); |
| 196 | } else { |
| 197 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 198 | ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); |
| 199 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
| 200 | ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); |
| 201 | } |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 202 | } else if (AR_SREV_9462_21(ah)) { |
| 203 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 204 | ar9462_2p1_mac_core); |
| 205 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 206 | ar9462_2p1_mac_postamble); |
| 207 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 208 | ar9462_2p1_baseband_core); |
| 209 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 210 | ar9462_2p1_baseband_postamble); |
| 211 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 212 | ar9462_2p1_radio_core); |
| 213 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 214 | ar9462_2p1_radio_postamble); |
| 215 | INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant, |
| 216 | ar9462_2p1_radio_postamble_sys2ant); |
| 217 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 218 | ar9462_2p1_soc_preamble); |
| 219 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 220 | ar9462_2p1_soc_postamble); |
| 221 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 222 | ar9462_2p1_common_rx_gain); |
| 223 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
| 224 | ar9462_2p1_modes_fast_clock); |
| 225 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 226 | ar9462_2p1_baseband_core_txfir_coeff_japan_2484); |
Sujith Manoharan | f51ecd7 | 2013-10-29 11:35:31 +0530 | [diff] [blame] | 227 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 228 | ar9462_2p1_pciephy_clkreq_disable_L1); |
| 229 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
| 230 | ar9462_2p1_pciephy_clkreq_disable_L1); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 231 | } else if (AR_SREV_9462_20(ah)) { |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 232 | |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 233 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], ar9462_2p0_mac_core); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 234 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 235 | ar9462_2p0_mac_postamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 236 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 237 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 238 | ar9462_2p0_baseband_core); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 239 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 240 | ar9462_2p0_baseband_postamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 241 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 242 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 243 | ar9462_2p0_radio_core); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 244 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 245 | ar9462_2p0_radio_postamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 246 | INIT_INI_ARRAY(&ah->ini_radio_post_sys2ant, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 247 | ar9462_2p0_radio_postamble_sys2ant); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 248 | |
| 249 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 250 | ar9462_2p0_soc_preamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 251 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 252 | ar9462_2p0_soc_postamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 253 | |
| 254 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 255 | ar9462_2p0_common_rx_gain); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 256 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 257 | /* Awake -> Sleep Setting */ |
| 258 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 259 | ar9462_2p0_pciephy_clkreq_disable_L1); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 260 | /* Sleep -> Awake Setting */ |
| 261 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 262 | ar9462_2p0_pciephy_clkreq_disable_L1); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 263 | |
| 264 | /* Fast clock modal settings */ |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 265 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 266 | ar9462_2p0_modes_fast_clock); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 267 | |
| 268 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
Sujith Manoharan | 57527f8 | 2012-11-13 11:33:53 +0530 | [diff] [blame] | 269 | ar9462_2p0_baseband_core_txfir_coeff_japan_2484); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 270 | } else if (AR_SREV_9550(ah)) { |
| 271 | /* mac */ |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 272 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 273 | ar955x_1p0_mac_core); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 274 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 275 | ar955x_1p0_mac_postamble); |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 276 | |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 277 | /* bb */ |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 278 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 279 | ar955x_1p0_baseband_core); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 280 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 281 | ar955x_1p0_baseband_postamble); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 282 | |
| 283 | /* radio */ |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 284 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 285 | ar955x_1p0_radio_core); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 286 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 287 | ar955x_1p0_radio_postamble); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 288 | |
| 289 | /* soc */ |
| 290 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 291 | ar955x_1p0_soc_preamble); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 292 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 293 | ar955x_1p0_soc_postamble); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 294 | |
| 295 | /* rx/tx gain */ |
| 296 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 297 | ar955x_1p0_common_wo_xlna_rx_gain_table); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 298 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 299 | ar955x_1p0_common_wo_xlna_rx_gain_bounds); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 300 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 301 | ar955x_1p0_modes_xpa_tx_gain_table); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 302 | |
| 303 | /* Fast clock modal settings */ |
| 304 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 305 | ar955x_1p0_modes_fast_clock); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 306 | } else if (AR_SREV_9580(ah)) { |
| 307 | /* mac */ |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 308 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 309 | ar9580_1p0_mac_core); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 310 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 311 | ar9580_1p0_mac_postamble); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 312 | |
| 313 | /* bb */ |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 314 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 315 | ar9580_1p0_baseband_core); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 316 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 317 | ar9580_1p0_baseband_postamble); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 318 | |
| 319 | /* radio */ |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 320 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 321 | ar9580_1p0_radio_core); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 322 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 323 | ar9580_1p0_radio_postamble); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 324 | |
| 325 | /* soc */ |
| 326 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 327 | ar9580_1p0_soc_preamble); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 328 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 329 | ar9580_1p0_soc_postamble); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 330 | |
| 331 | /* rx/tx gain */ |
| 332 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 333 | ar9580_1p0_rx_gain_table); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 334 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 335 | ar9580_1p0_low_ob_db_tx_gain_table); |
Luis R. Rodriguez | 5a63ef0 | 2011-08-24 15:36:08 -0700 | [diff] [blame] | 336 | |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 337 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 338 | ar9580_1p0_modes_fast_clock); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 339 | } else if (AR_SREV_9565_11_OR_LATER(ah)) { |
| 340 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 341 | ar9565_1p1_mac_core); |
| 342 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 343 | ar9565_1p1_mac_postamble); |
| 344 | |
| 345 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 346 | ar9565_1p1_baseband_core); |
| 347 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 348 | ar9565_1p1_baseband_postamble); |
| 349 | |
| 350 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 351 | ar9565_1p1_radio_core); |
| 352 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 353 | ar9565_1p1_radio_postamble); |
| 354 | |
| 355 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 356 | ar9565_1p1_soc_preamble); |
| 357 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 358 | ar9565_1p1_soc_postamble); |
| 359 | |
| 360 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 361 | ar9565_1p1_Common_rx_gain_table); |
| 362 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 363 | ar9565_1p1_Modes_lowest_ob_db_tx_gain_table); |
| 364 | |
| 365 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
| 366 | ar9565_1p1_pciephy_clkreq_disable_L1); |
| 367 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
| 368 | ar9565_1p1_pciephy_clkreq_disable_L1); |
| 369 | |
| 370 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
| 371 | ar9565_1p1_modes_fast_clock); |
| 372 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 373 | ar9565_1p1_baseband_core_txfir_coeff_japan_2484); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 374 | } else if (AR_SREV_9565(ah)) { |
| 375 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
| 376 | ar9565_1p0_mac_core); |
| 377 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
| 378 | ar9565_1p0_mac_postamble); |
| 379 | |
| 380 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
| 381 | ar9565_1p0_baseband_core); |
| 382 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
| 383 | ar9565_1p0_baseband_postamble); |
| 384 | |
| 385 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
| 386 | ar9565_1p0_radio_core); |
| 387 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
| 388 | ar9565_1p0_radio_postamble); |
| 389 | |
| 390 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
| 391 | ar9565_1p0_soc_preamble); |
| 392 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
| 393 | ar9565_1p0_soc_postamble); |
| 394 | |
| 395 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 396 | ar9565_1p0_Common_rx_gain_table); |
| 397 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 398 | ar9565_1p0_Modes_lowest_ob_db_tx_gain_table); |
| 399 | |
| 400 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
Rajkumar Manoharan | 8446484 | 2012-10-25 17:16:51 +0530 | [diff] [blame] | 401 | ar9565_1p0_pciephy_clkreq_disable_L1); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 402 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
Rajkumar Manoharan | 8446484 | 2012-10-25 17:16:51 +0530 | [diff] [blame] | 403 | ar9565_1p0_pciephy_clkreq_disable_L1); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 404 | |
| 405 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
| 406 | ar9565_1p0_modes_fast_clock); |
Sujith Manoharan | 6d5228f | 2013-09-03 10:28:56 +0530 | [diff] [blame] | 407 | INIT_INI_ARRAY(&ah->iniCckfirJapan2484, |
| 408 | ar9565_1p0_baseband_core_txfir_coeff_japan_2484); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 409 | } else { |
| 410 | /* mac */ |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 411 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 412 | ar9300_2p2_mac_core); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 413 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 414 | ar9300_2p2_mac_postamble); |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 415 | |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 416 | /* bb */ |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 417 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 418 | ar9300_2p2_baseband_core); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 419 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 420 | ar9300_2p2_baseband_postamble); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 421 | |
| 422 | /* radio */ |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 423 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 424 | ar9300_2p2_radio_core); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 425 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 426 | ar9300_2p2_radio_postamble); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 427 | |
| 428 | /* soc */ |
| 429 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 430 | ar9300_2p2_soc_preamble); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 431 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 432 | ar9300_2p2_soc_postamble); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 433 | |
| 434 | /* rx/tx gain */ |
| 435 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 436 | ar9300Common_rx_gain_table_2p2); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 437 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 438 | ar9300Modes_lowest_ob_db_tx_gain_table_2p2); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 439 | |
| 440 | /* Load PCIE SERDES settings from INI */ |
| 441 | |
| 442 | /* Awake Setting */ |
| 443 | |
| 444 | INIT_INI_ARRAY(&ah->iniPcieSerdes, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 445 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p2); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 446 | |
| 447 | /* Sleep Setting */ |
| 448 | |
| 449 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 450 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p2); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 451 | |
| 452 | /* Fast clock modal settings */ |
Felix Fietkau | c7d36f9 | 2012-03-14 16:40:31 +0100 | [diff] [blame] | 453 | INIT_INI_ARRAY(&ah->iniModesFastClock, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 454 | ar9300Modes_fast_clock_2p2); |
Vasanthakumar Thiagarajan | c88457e | 2010-12-06 04:27:37 -0800 | [diff] [blame] | 455 | } |
Luis R. Rodriguez | 7284635 | 2010-05-12 21:15:05 -0400 | [diff] [blame] | 456 | } |
| 457 | |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 458 | static void ar9003_tx_gain_table_mode0(struct ath_hw *ah) |
| 459 | { |
| 460 | if (AR_SREV_9330_12(ah)) |
| 461 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 462 | ar9331_modes_lowest_ob_db_tx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 463 | else if (AR_SREV_9330_11(ah)) |
| 464 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 465 | ar9331_modes_lowest_ob_db_tx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 466 | else if (AR_SREV_9340(ah)) |
| 467 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 468 | ar9340Modes_lowest_ob_db_tx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 469 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 470 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 471 | ar9485_modes_lowest_ob_db_tx_gain_1_1); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 472 | else if (AR_SREV_9550(ah)) |
| 473 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 474 | ar955x_1p0_modes_xpa_tx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 475 | else if (AR_SREV_9580(ah)) |
| 476 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 477 | ar9580_1p0_lowest_ob_db_tx_gain_table); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 478 | else if (AR_SREV_9462_21(ah)) |
| 479 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 480 | ar9462_2p1_modes_low_ob_db_tx_gain); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 481 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 482 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 483 | ar9462_2p0_modes_low_ob_db_tx_gain); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 484 | else if (AR_SREV_9565_11(ah)) |
| 485 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 486 | ar9565_1p1_modes_low_ob_db_tx_gain_table); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 487 | else if (AR_SREV_9565(ah)) |
| 488 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 489 | ar9565_1p0_modes_low_ob_db_tx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 490 | else |
| 491 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 492 | ar9300Modes_lowest_ob_db_tx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 493 | } |
| 494 | |
| 495 | static void ar9003_tx_gain_table_mode1(struct ath_hw *ah) |
| 496 | { |
| 497 | if (AR_SREV_9330_12(ah)) |
| 498 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 499 | ar9331_modes_high_ob_db_tx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 500 | else if (AR_SREV_9330_11(ah)) |
| 501 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 502 | ar9331_modes_high_ob_db_tx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 503 | else if (AR_SREV_9340(ah)) |
| 504 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 505 | ar9340Modes_high_ob_db_tx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 506 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 507 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 508 | ar9485Modes_high_ob_db_tx_gain_1_1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 509 | else if (AR_SREV_9580(ah)) |
| 510 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 511 | ar9580_1p0_high_ob_db_tx_gain_table); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 512 | else if (AR_SREV_9550(ah)) |
| 513 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 514 | ar955x_1p0_modes_no_xpa_tx_gain_table); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 515 | else if (AR_SREV_9462_21(ah)) |
| 516 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 517 | ar9462_2p1_modes_high_ob_db_tx_gain); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 518 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 519 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 520 | ar9462_2p0_modes_high_ob_db_tx_gain); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 521 | else if (AR_SREV_9565_11(ah)) |
| 522 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 523 | ar9565_1p1_modes_high_ob_db_tx_gain_table); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 524 | else if (AR_SREV_9565(ah)) |
| 525 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 526 | ar9565_1p0_modes_high_ob_db_tx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 527 | else |
| 528 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 529 | ar9300Modes_high_ob_db_tx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 530 | } |
| 531 | |
| 532 | static void ar9003_tx_gain_table_mode2(struct ath_hw *ah) |
| 533 | { |
| 534 | if (AR_SREV_9330_12(ah)) |
| 535 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 536 | ar9331_modes_low_ob_db_tx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 537 | else if (AR_SREV_9330_11(ah)) |
| 538 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 539 | ar9331_modes_low_ob_db_tx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 540 | else if (AR_SREV_9340(ah)) |
| 541 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 542 | ar9340Modes_low_ob_db_tx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 543 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 544 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 545 | ar9485Modes_low_ob_db_tx_gain_1_1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 546 | else if (AR_SREV_9580(ah)) |
| 547 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 548 | ar9580_1p0_low_ob_db_tx_gain_table); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 549 | else if (AR_SREV_9565_11(ah)) |
| 550 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 551 | ar9565_1p1_modes_low_ob_db_tx_gain_table); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 552 | else if (AR_SREV_9565(ah)) |
| 553 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 554 | ar9565_1p0_modes_low_ob_db_tx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 555 | else |
| 556 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 557 | ar9300Modes_low_ob_db_tx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 558 | } |
| 559 | |
| 560 | static void ar9003_tx_gain_table_mode3(struct ath_hw *ah) |
| 561 | { |
| 562 | if (AR_SREV_9330_12(ah)) |
| 563 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 564 | ar9331_modes_high_power_tx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 565 | else if (AR_SREV_9330_11(ah)) |
| 566 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 567 | ar9331_modes_high_power_tx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 568 | else if (AR_SREV_9340(ah)) |
| 569 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 570 | ar9340Modes_high_power_tx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 571 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 572 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 573 | ar9485Modes_high_power_tx_gain_1_1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 574 | else if (AR_SREV_9580(ah)) |
| 575 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 576 | ar9580_1p0_high_power_tx_gain_table); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 577 | else if (AR_SREV_9565_11(ah)) |
| 578 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 579 | ar9565_1p1_modes_high_power_tx_gain_table); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 580 | else if (AR_SREV_9565(ah)) |
| 581 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 582 | ar9565_1p0_modes_high_power_tx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 583 | else |
| 584 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 585 | ar9300Modes_high_power_tx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 586 | } |
| 587 | |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame] | 588 | static void ar9003_tx_gain_table_mode4(struct ath_hw *ah) |
| 589 | { |
| 590 | if (AR_SREV_9340(ah)) |
| 591 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 592 | ar9340Modes_mixed_ob_db_tx_gain_table_1p0); |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame] | 593 | else if (AR_SREV_9580(ah)) |
| 594 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 595 | ar9580_1p0_mixed_ob_db_tx_gain_table); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 596 | else if (AR_SREV_9462_21(ah)) |
| 597 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 598 | ar9462_2p1_modes_mix_ob_db_tx_gain); |
Sujith Manoharan | 9a54c17 | 2013-06-25 12:29:23 +0530 | [diff] [blame] | 599 | else if (AR_SREV_9462_20(ah)) |
| 600 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 601 | ar9462_2p0_modes_mix_ob_db_tx_gain); |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 602 | else |
| 603 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 604 | ar9300Modes_mixed_ob_db_tx_gain_table_2p2); |
Felix Fietkau | b05a011 | 2012-07-15 19:53:32 +0200 | [diff] [blame] | 605 | } |
| 606 | |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 607 | static void ar9003_tx_gain_table_mode5(struct ath_hw *ah) |
| 608 | { |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 609 | if (AR_SREV_9485_11_OR_LATER(ah)) |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 610 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 611 | ar9485Modes_green_ob_db_tx_gain_1_1); |
| 612 | else if (AR_SREV_9340(ah)) |
| 613 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 614 | ar9340Modes_ub124_tx_gain_table_1p0); |
| 615 | else if (AR_SREV_9580(ah)) |
| 616 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 617 | ar9580_1p0_type5_tx_gain_table); |
| 618 | else if (AR_SREV_9300_22(ah)) |
| 619 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 620 | ar9300Modes_type5_tx_gain_table_2p2); |
| 621 | } |
| 622 | |
| 623 | static void ar9003_tx_gain_table_mode6(struct ath_hw *ah) |
| 624 | { |
| 625 | if (AR_SREV_9340(ah)) |
| 626 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 627 | ar9340Modes_low_ob_db_and_spur_tx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 628 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 629 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 630 | ar9485Modes_green_spur_ob_db_tx_gain_1_1); |
| 631 | else if (AR_SREV_9580(ah)) |
| 632 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 633 | ar9580_1p0_type6_tx_gain_table); |
| 634 | } |
| 635 | |
Sujith Manoharan | 8fd007a | 2013-11-05 05:54:59 +0530 | [diff] [blame] | 636 | static void ar9003_tx_gain_table_mode7(struct ath_hw *ah) |
| 637 | { |
| 638 | if (AR_SREV_9340(ah)) |
| 639 | INIT_INI_ARRAY(&ah->iniModesTxGain, |
| 640 | ar9340_cus227_tx_gain_table_1p0); |
| 641 | } |
| 642 | |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 643 | typedef void (*ath_txgain_tab)(struct ath_hw *ah); |
| 644 | |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 645 | static void ar9003_tx_gain_table_apply(struct ath_hw *ah) |
| 646 | { |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 647 | static const ath_txgain_tab modes[] = { |
| 648 | ar9003_tx_gain_table_mode0, |
| 649 | ar9003_tx_gain_table_mode1, |
| 650 | ar9003_tx_gain_table_mode2, |
| 651 | ar9003_tx_gain_table_mode3, |
| 652 | ar9003_tx_gain_table_mode4, |
| 653 | ar9003_tx_gain_table_mode5, |
| 654 | ar9003_tx_gain_table_mode6, |
Sujith Manoharan | 8fd007a | 2013-11-05 05:54:59 +0530 | [diff] [blame] | 655 | ar9003_tx_gain_table_mode7, |
Felix Fietkau | eab6d79 | 2013-01-10 19:41:52 +0100 | [diff] [blame] | 656 | }; |
| 657 | int idx = ar9003_hw_get_tx_gain_idx(ah); |
| 658 | |
| 659 | if (idx >= ARRAY_SIZE(modes)) |
| 660 | idx = 0; |
| 661 | |
| 662 | modes[idx](ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 663 | } |
| 664 | |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 665 | static void ar9003_rx_gain_table_mode0(struct ath_hw *ah) |
| 666 | { |
| 667 | if (AR_SREV_9330_12(ah)) |
| 668 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 669 | ar9331_common_rx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 670 | else if (AR_SREV_9330_11(ah)) |
| 671 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 672 | ar9331_common_rx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 673 | else if (AR_SREV_9340(ah)) |
| 674 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 675 | ar9340Common_rx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 676 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 677 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | a796a1d | 2012-12-26 12:27:39 +0530 | [diff] [blame] | 678 | ar9485_common_rx_gain_1_1); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 679 | else if (AR_SREV_9550(ah)) { |
| 680 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 681 | ar955x_1p0_common_rx_gain_table); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 682 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 683 | ar955x_1p0_common_rx_gain_bounds); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 684 | } else if (AR_SREV_9580(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 685 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 686 | ar9580_1p0_rx_gain_table); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 687 | else if (AR_SREV_9462_21(ah)) |
| 688 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 689 | ar9462_2p1_common_rx_gain); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 690 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 691 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 692 | ar9462_2p0_common_rx_gain); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 693 | else if (AR_SREV_9565_11(ah)) |
| 694 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 695 | ar9565_1p1_Common_rx_gain_table); |
Sujith Manoharan | 6ac2150 | 2013-09-02 13:59:02 +0530 | [diff] [blame] | 696 | else if (AR_SREV_9565(ah)) |
| 697 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 698 | ar9565_1p0_Common_rx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 699 | else |
| 700 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 701 | ar9300Common_rx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 702 | } |
| 703 | |
| 704 | static void ar9003_rx_gain_table_mode1(struct ath_hw *ah) |
| 705 | { |
| 706 | if (AR_SREV_9330_12(ah)) |
| 707 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 708 | ar9331_common_wo_xlna_rx_gain_1p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 709 | else if (AR_SREV_9330_11(ah)) |
| 710 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 711 | ar9331_common_wo_xlna_rx_gain_1p1); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 712 | else if (AR_SREV_9340(ah)) |
| 713 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 714 | ar9340Common_wo_xlna_rx_gain_table_1p0); |
Sujith Manoharan | fb5a2dc | 2013-08-19 11:03:43 +0530 | [diff] [blame] | 715 | else if (AR_SREV_9485_11_OR_LATER(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 716 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 717 | ar9485Common_wo_xlna_rx_gain_1_1); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 718 | else if (AR_SREV_9462_21(ah)) |
| 719 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 720 | ar9462_2p1_common_wo_xlna_rx_gain); |
Rajkumar Manoharan | 423e38e | 2011-10-13 11:00:44 +0530 | [diff] [blame] | 721 | else if (AR_SREV_9462_20(ah)) |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 722 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 723 | ar9462_2p0_common_wo_xlna_rx_gain); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 724 | else if (AR_SREV_9550(ah)) { |
| 725 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 726 | ar955x_1p0_common_wo_xlna_rx_gain_table); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 727 | INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 728 | ar955x_1p0_common_wo_xlna_rx_gain_bounds); |
Gabor Juhos | 8bc45c6 | 2012-07-03 19:13:23 +0200 | [diff] [blame] | 729 | } else if (AR_SREV_9580(ah)) |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 730 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 731 | ar9580_1p0_wo_xlna_rx_gain_table); |
Sujith Manoharan | 3777f7d | 2013-11-19 12:11:13 +0530 | [diff] [blame] | 732 | else if (AR_SREV_9565_11(ah)) |
| 733 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 734 | ar9565_1p1_common_wo_xlna_rx_gain_table); |
Sujith Manoharan | aaa53ee | 2012-09-10 09:19:54 +0530 | [diff] [blame] | 735 | else if (AR_SREV_9565(ah)) |
| 736 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 737 | ar9565_1p0_common_wo_xlna_rx_gain_table); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 738 | else |
| 739 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Felix Fietkau | a364517 | 2012-07-15 19:53:33 +0200 | [diff] [blame] | 740 | ar9300Common_wo_xlna_rx_gain_table_2p2); |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 741 | } |
| 742 | |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 743 | static void ar9003_rx_gain_table_mode2(struct ath_hw *ah) |
| 744 | { |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 745 | if (AR_SREV_9462_21(ah)) { |
| 746 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
| 747 | ar9462_2p1_common_mixed_rx_gain); |
| 748 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_core, |
| 749 | ar9462_2p1_baseband_core_mix_rxgain); |
| 750 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_postamble, |
| 751 | ar9462_2p1_baseband_postamble_mix_rxgain); |
| 752 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_5g_xlna, |
| 753 | ar9462_2p1_baseband_postamble_5g_xlna); |
| 754 | } else if (AR_SREV_9462_20(ah)) { |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 755 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 756 | ar9462_2p0_common_mixed_rx_gain); |
Sujith Manoharan | c177fab | 2013-06-18 15:42:38 +0530 | [diff] [blame] | 757 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_core, |
| 758 | ar9462_2p0_baseband_core_mix_rxgain); |
| 759 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_bb_postamble, |
| 760 | ar9462_2p0_baseband_postamble_mix_rxgain); |
Sujith Manoharan | 51dbd0a | 2013-06-18 10:13:42 +0530 | [diff] [blame] | 761 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_5g_xlna, |
| 762 | ar9462_2p0_baseband_postamble_5g_xlna); |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | static void ar9003_rx_gain_table_mode3(struct ath_hw *ah) |
| 767 | { |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 768 | if (AR_SREV_9462_21(ah)) { |
| 769 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 770 | ar9462_2p1_common_5g_xlna_only_rxgain); |
Sujith Manoharan | d567e4e | 2013-06-24 18:18:45 +0530 | [diff] [blame] | 771 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_5g_xlna, |
| 772 | ar9462_2p1_baseband_postamble_5g_xlna); |
| 773 | } else if (AR_SREV_9462_20(ah)) { |
Sujith Manoharan | 51dbd0a | 2013-06-18 10:13:42 +0530 | [diff] [blame] | 774 | INIT_INI_ARRAY(&ah->iniModesRxGain, |
Sujith Manoharan | dbb3e2f | 2013-11-26 15:04:55 +0530 | [diff] [blame] | 775 | ar9462_2p0_common_5g_xlna_only_rxgain); |
Sujith Manoharan | 51dbd0a | 2013-06-18 10:13:42 +0530 | [diff] [blame] | 776 | INIT_INI_ARRAY(&ah->ini_modes_rxgain_5g_xlna, |
| 777 | ar9462_2p0_baseband_postamble_5g_xlna); |
| 778 | } |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 779 | } |
| 780 | |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 781 | static void ar9003_rx_gain_table_apply(struct ath_hw *ah) |
| 782 | { |
| 783 | switch (ar9003_hw_get_rx_gain_idx(ah)) { |
| 784 | case 0: |
| 785 | default: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 786 | ar9003_rx_gain_table_mode0(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 787 | break; |
| 788 | case 1: |
Senthil Balasubramanian | 4d0707e | 2011-09-13 22:38:17 +0530 | [diff] [blame] | 789 | ar9003_rx_gain_table_mode1(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 790 | break; |
Senthil Balasubramanian | 2577c6e | 2011-09-13 22:38:18 +0530 | [diff] [blame] | 791 | case 2: |
| 792 | ar9003_rx_gain_table_mode2(ah); |
| 793 | break; |
Sujith Manoharan | 51dbd0a | 2013-06-18 10:13:42 +0530 | [diff] [blame] | 794 | case 3: |
| 795 | ar9003_rx_gain_table_mode3(ah); |
| 796 | break; |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 797 | } |
| 798 | } |
| 799 | |
| 800 | /* set gain table pointers according to values read from the eeprom */ |
| 801 | static void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah) |
| 802 | { |
| 803 | ar9003_tx_gain_table_apply(ah); |
| 804 | ar9003_rx_gain_table_apply(ah); |
| 805 | } |
| 806 | |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 807 | /* |
| 808 | * Helper for ASPM support. |
| 809 | * |
| 810 | * Disable PLL when in L0s as well as receiver clock when in L1. |
| 811 | * This power saving option must be enabled through the SerDes. |
| 812 | * |
| 813 | * Programming the SerDes must go through the same 288 bit serial shift |
| 814 | * register as the other analog registers. Hence the 9 writes. |
| 815 | */ |
| 816 | static void ar9003_hw_configpcipowersave(struct ath_hw *ah, |
Stanislaw Gruszka | 84c87dc | 2011-08-05 13:10:32 +0200 | [diff] [blame] | 817 | bool power_off) |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 818 | { |
Sujith Manoharan | c6fc7e6 | 2013-10-29 11:52:06 +0530 | [diff] [blame] | 819 | unsigned int i; |
| 820 | struct ar5416IniArray *array; |
| 821 | |
Sujith Manoharan | b380a43b | 2013-08-25 14:43:09 +0530 | [diff] [blame] | 822 | /* |
| 823 | * Increase L1 Entry Latency. Some WB222 boards don't have |
| 824 | * this change in eeprom/OTP. |
| 825 | * |
| 826 | */ |
| 827 | if (AR_SREV_9462(ah)) { |
| 828 | u32 val = ah->config.aspm_l1_fix; |
| 829 | if ((val & 0xff000000) == 0x17000000) { |
| 830 | val &= 0x00ffffff; |
| 831 | val |= 0x27000000; |
| 832 | REG_WRITE(ah, 0x570c, val); |
| 833 | } |
| 834 | } |
| 835 | |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 836 | /* Nothing to do on restore for 11N */ |
Stanislaw Gruszka | 84c87dc | 2011-08-05 13:10:32 +0200 | [diff] [blame] | 837 | if (!power_off /* !restore */) { |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 838 | /* set bit 19 to allow forcing of pcie core into L1 state */ |
| 839 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); |
Sujith Manoharan | d1ae25a | 2013-08-25 16:30:40 +0530 | [diff] [blame] | 840 | REG_WRITE(ah, AR_WA, ah->WARegVal); |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 841 | } |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 842 | |
| 843 | /* |
| 844 | * Configire PCIE after Ini init. SERDES values now come from ini file |
| 845 | * This enables PCIe low power mode. |
| 846 | */ |
Sujith Manoharan | c6fc7e6 | 2013-10-29 11:52:06 +0530 | [diff] [blame] | 847 | array = power_off ? &ah->iniPcieSerdes : |
| 848 | &ah->iniPcieSerdesLowPower; |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 849 | |
Sujith Manoharan | c6fc7e6 | 2013-10-29 11:52:06 +0530 | [diff] [blame] | 850 | for (i = 0; i < array->ia_rows; i++) { |
| 851 | REG_WRITE(ah, |
| 852 | INI_RA(array, i, 0), |
| 853 | INI_RA(array, i, 1)); |
Luis R. Rodriguez | 653fe37 | 2010-06-21 18:38:48 -0400 | [diff] [blame] | 854 | } |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 855 | } |
| 856 | |
| 857 | /* Sets up the AR9003 hardware familiy callbacks */ |
| 858 | void ar9003_hw_attach_ops(struct ath_hw *ah) |
| 859 | { |
| 860 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
| 861 | struct ath_hw_ops *ops = ath9k_hw_ops(ah); |
| 862 | |
Felix Fietkau | 6aaacd8 | 2013-01-13 19:54:58 +0100 | [diff] [blame] | 863 | ar9003_hw_init_mode_regs(ah); |
Luis R. Rodriguez | c14a85d | 2010-04-15 17:39:21 -0400 | [diff] [blame] | 864 | priv_ops->init_mode_gain_regs = ar9003_hw_init_mode_gain_regs; |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 865 | |
| 866 | ops->config_pci_powersave = ar9003_hw_configpcipowersave; |
| 867 | |
| 868 | ar9003_hw_attach_phy_ops(ah); |
| 869 | ar9003_hw_attach_calib_ops(ah); |
| 870 | ar9003_hw_attach_mac_ops(ah); |
Luis R. Rodriguez | b3950e6 | 2010-04-15 17:39:03 -0400 | [diff] [blame] | 871 | } |