diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2009-10-09 16:20:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:47:58 -0400 |
commit | b660d3adb8dd4ead54744c9269bae9338163020a (patch) | |
tree | 1fe12d7e532887565eddaa5a27a0d951aeb611fe /drivers/net/wireless/iwlwifi | |
parent | 278d84051d1944080d4cfdba205af5f5ce4f4064 (diff) |
iwlagn, iwl3945: remove apm_reset() functions
Clean up device-specific apm_reset() functions and library infrastructure,
now that these reset() functions are no longer being used.
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 41 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 |
7 files changed, 0 insertions, 132 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 679a67ff76eb..1fc38142a491 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -111,7 +111,6 @@ static struct iwl_lib_ops iwl1000_lib = { | |||
111 | .update_chain_flags = iwl_update_chain_flags, | 111 | .update_chain_flags = iwl_update_chain_flags, |
112 | .apm_ops = { | 112 | .apm_ops = { |
113 | .init = iwl5000_apm_init, | 113 | .init = iwl5000_apm_init, |
114 | .reset = iwl5000_apm_reset, | ||
115 | .stop = iwl_apm_stop, | 114 | .stop = iwl_apm_stop, |
116 | .config = iwl1000_nic_config, | 115 | .config = iwl1000_nic_config, |
117 | .set_pwr_src = iwl_set_pwr_src, | 116 | .set_pwr_src = iwl_set_pwr_src, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 89f82396a13a..f8ce96c94c6b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1198,47 +1198,6 @@ void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv) | |||
1198 | iwl3945_hw_txq_ctx_free(priv); | 1198 | iwl3945_hw_txq_ctx_free(priv); |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | static int iwl3945_apm_reset(struct iwl_priv *priv) | ||
1202 | { | ||
1203 | iwl_apm_stop_master(priv); | ||
1204 | |||
1205 | |||
1206 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); | ||
1207 | udelay(10); | ||
1208 | |||
1209 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | ||
1210 | |||
1211 | iwl_poll_bit(priv, CSR_GP_CNTRL, | ||
1212 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | ||
1213 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
1214 | |||
1215 | iwl_write_prph(priv, APMG_CLK_CTRL_REG, | ||
1216 | APMG_CLK_VAL_BSM_CLK_RQT); | ||
1217 | |||
1218 | iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0); | ||
1219 | iwl_write_prph(priv, APMG_RTC_INT_STT_REG, | ||
1220 | 0xFFFFFFFF); | ||
1221 | |||
1222 | /* enable DMA */ | ||
1223 | iwl_write_prph(priv, APMG_CLK_EN_REG, | ||
1224 | APMG_CLK_VAL_DMA_CLK_RQT | | ||
1225 | APMG_CLK_VAL_BSM_CLK_RQT); | ||
1226 | udelay(10); | ||
1227 | |||
1228 | iwl_set_bits_prph(priv, APMG_PS_CTRL_REG, | ||
1229 | APMG_PS_CTRL_VAL_RESET_REQ); | ||
1230 | udelay(5); | ||
1231 | iwl_clear_bits_prph(priv, APMG_PS_CTRL_REG, | ||
1232 | APMG_PS_CTRL_VAL_RESET_REQ); | ||
1233 | |||
1234 | /* Clear the 'host command active' bit... */ | ||
1235 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); | ||
1236 | |||
1237 | wake_up_interruptible(&priv->wait_command_queue); | ||
1238 | |||
1239 | return 0; | ||
1240 | } | ||
1241 | |||
1242 | /** | 1201 | /** |
1243 | * iwl3945_hw_reg_adjust_power_by_temp | 1202 | * iwl3945_hw_reg_adjust_power_by_temp |
1244 | * return index delta into power gain settings table | 1203 | * return index delta into power gain settings table |
@@ -2833,7 +2792,6 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2833 | .dump_nic_error_log = iwl3945_dump_nic_error_log, | 2792 | .dump_nic_error_log = iwl3945_dump_nic_error_log, |
2834 | .apm_ops = { | 2793 | .apm_ops = { |
2835 | .init = iwl3945_apm_init, | 2794 | .init = iwl3945_apm_init, |
2836 | .reset = iwl3945_apm_reset, | ||
2837 | .stop = iwl_apm_stop, | 2795 | .stop = iwl_apm_stop, |
2838 | .config = iwl3945_nic_config, | 2796 | .config = iwl3945_nic_config, |
2839 | .set_pwr_src = iwl3945_set_pwr_src, | 2797 | .set_pwr_src = iwl3945_set_pwr_src, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index f8eed9a4abc1..782a36198f38 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -397,46 +397,6 @@ static void iwl4965_nic_config(struct iwl_priv *priv) | |||
397 | spin_unlock_irqrestore(&priv->lock, flags); | 397 | spin_unlock_irqrestore(&priv->lock, flags); |
398 | } | 398 | } |
399 | 399 | ||
400 | static int iwl4965_apm_reset(struct iwl_priv *priv) | ||
401 | { | ||
402 | int ret = 0; | ||
403 | |||
404 | iwl_apm_stop_master(priv); | ||
405 | |||
406 | |||
407 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); | ||
408 | |||
409 | udelay(10); | ||
410 | |||
411 | /* FIXME: put here L1A -L0S w/a */ | ||
412 | |||
413 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | ||
414 | |||
415 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | ||
416 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | ||
417 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
418 | if (ret < 0) | ||
419 | goto out; | ||
420 | |||
421 | udelay(10); | ||
422 | |||
423 | /* Enable DMA and BSM Clock */ | ||
424 | iwl_write_prph(priv, APMG_CLK_EN_REG, APMG_CLK_VAL_DMA_CLK_RQT | | ||
425 | APMG_CLK_VAL_BSM_CLK_RQT); | ||
426 | |||
427 | udelay(10); | ||
428 | |||
429 | /* disable L1A */ | ||
430 | iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, | ||
431 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); | ||
432 | |||
433 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); | ||
434 | wake_up_interruptible(&priv->wait_command_queue); | ||
435 | |||
436 | out: | ||
437 | return ret; | ||
438 | } | ||
439 | |||
440 | /* Reset differential Rx gains in NIC to prepare for chain noise calibration. | 400 | /* Reset differential Rx gains in NIC to prepare for chain noise calibration. |
441 | * Called after every association, but this runs only once! | 401 | * Called after every association, but this runs only once! |
442 | * ... once chain noise is calibrated the first time, it's good forever. */ | 402 | * ... once chain noise is calibrated the first time, it's good forever. */ |
@@ -2273,7 +2233,6 @@ static struct iwl_lib_ops iwl4965_lib = { | |||
2273 | .dump_nic_error_log = iwl_dump_nic_error_log, | 2233 | .dump_nic_error_log = iwl_dump_nic_error_log, |
2274 | .apm_ops = { | 2234 | .apm_ops = { |
2275 | .init = iwl4965_apm_init, | 2235 | .init = iwl4965_apm_init, |
2276 | .reset = iwl4965_apm_reset, | ||
2277 | .stop = iwl_apm_stop, | 2236 | .stop = iwl_apm_stop, |
2278 | .config = iwl4965_nic_config, | 2237 | .config = iwl4965_nic_config, |
2279 | .set_pwr_src = iwl_set_pwr_src, | 2238 | .set_pwr_src = iwl_set_pwr_src, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 8cc3d50e7f59..33b38aa0d8c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -118,49 +118,6 @@ int iwl5000_apm_init(struct iwl_priv *priv) | |||
118 | return ret; | 118 | return ret; |
119 | } | 119 | } |
120 | 120 | ||
121 | int iwl5000_apm_reset(struct iwl_priv *priv) | ||
122 | { | ||
123 | int ret = 0; | ||
124 | |||
125 | iwl_apm_stop_master(priv); | ||
126 | |||
127 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); | ||
128 | |||
129 | udelay(10); | ||
130 | |||
131 | |||
132 | /* FIXME: put here L1A -L0S w/a */ | ||
133 | |||
134 | if (priv->cfg->need_pll_cfg) | ||
135 | iwl_set_bit(priv, CSR_ANA_PLL_CFG, CSR50_ANA_PLL_CFG_VAL); | ||
136 | |||
137 | /* set "initialization complete" bit to move adapter | ||
138 | * D0U* --> D0A* state */ | ||
139 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | ||
140 | |||
141 | /* wait for clock stabilization */ | ||
142 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | ||
143 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | ||
144 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
145 | if (ret < 0) { | ||
146 | IWL_DEBUG_INFO(priv, "Failed to init the card\n"); | ||
147 | goto out; | ||
148 | } | ||
149 | |||
150 | /* enable DMA */ | ||
151 | iwl_write_prph(priv, APMG_CLK_EN_REG, APMG_CLK_VAL_DMA_CLK_RQT); | ||
152 | |||
153 | udelay(20); | ||
154 | |||
155 | /* disable L1-Active */ | ||
156 | iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, | ||
157 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); | ||
158 | out: | ||
159 | |||
160 | return ret; | ||
161 | } | ||
162 | |||
163 | |||
164 | /* NIC configuration for 5000 series */ | 121 | /* NIC configuration for 5000 series */ |
165 | void iwl5000_nic_config(struct iwl_priv *priv) | 122 | void iwl5000_nic_config(struct iwl_priv *priv) |
166 | { | 123 | { |
@@ -1522,7 +1479,6 @@ struct iwl_lib_ops iwl5000_lib = { | |||
1522 | .update_chain_flags = iwl_update_chain_flags, | 1479 | .update_chain_flags = iwl_update_chain_flags, |
1523 | .apm_ops = { | 1480 | .apm_ops = { |
1524 | .init = iwl5000_apm_init, | 1481 | .init = iwl5000_apm_init, |
1525 | .reset = iwl5000_apm_reset, | ||
1526 | .stop = iwl_apm_stop, | 1482 | .stop = iwl_apm_stop, |
1527 | .config = iwl5000_nic_config, | 1483 | .config = iwl5000_nic_config, |
1528 | .set_pwr_src = iwl_set_pwr_src, | 1484 | .set_pwr_src = iwl_set_pwr_src, |
@@ -1574,7 +1530,6 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
1574 | .update_chain_flags = iwl_update_chain_flags, | 1530 | .update_chain_flags = iwl_update_chain_flags, |
1575 | .apm_ops = { | 1531 | .apm_ops = { |
1576 | .init = iwl5000_apm_init, | 1532 | .init = iwl5000_apm_init, |
1577 | .reset = iwl5000_apm_reset, | ||
1578 | .stop = iwl_apm_stop, | 1533 | .stop = iwl_apm_stop, |
1579 | .config = iwl5000_nic_config, | 1534 | .config = iwl5000_nic_config, |
1580 | .set_pwr_src = iwl_set_pwr_src, | 1535 | .set_pwr_src = iwl_set_pwr_src, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index d1f0b0b4ad0c..46af74b86a83 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -192,7 +192,6 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
192 | .update_chain_flags = iwl_update_chain_flags, | 192 | .update_chain_flags = iwl_update_chain_flags, |
193 | .apm_ops = { | 193 | .apm_ops = { |
194 | .init = iwl5000_apm_init, | 194 | .init = iwl5000_apm_init, |
195 | .reset = iwl5000_apm_reset, | ||
196 | .stop = iwl_apm_stop, | 195 | .stop = iwl_apm_stop, |
197 | .config = iwl6000_nic_config, | 196 | .config = iwl6000_nic_config, |
198 | .set_pwr_src = iwl_set_pwr_src, | 197 | .set_pwr_src = iwl_set_pwr_src, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 6688b6944200..447eb64e1f69 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -109,7 +109,6 @@ struct iwl_hcmd_utils_ops { | |||
109 | 109 | ||
110 | struct iwl_apm_ops { | 110 | struct iwl_apm_ops { |
111 | int (*init)(struct iwl_priv *priv); | 111 | int (*init)(struct iwl_priv *priv); |
112 | int (*reset)(struct iwl_priv *priv); | ||
113 | void (*stop)(struct iwl_priv *priv); | 112 | void (*stop)(struct iwl_priv *priv); |
114 | void (*config)(struct iwl_priv *priv); | 113 | void (*config)(struct iwl_priv *priv); |
115 | int (*set_pwr_src)(struct iwl_priv *priv, enum iwl_pwr_src src); | 114 | int (*set_pwr_src)(struct iwl_priv *priv, enum iwl_pwr_src src); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 72946c144be7..9da0b0343b99 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -86,7 +86,6 @@ extern void iwl5000_rts_tx_cmd_flag(struct ieee80211_tx_info *info, | |||
86 | extern int iwl5000_calc_rssi(struct iwl_priv *priv, | 86 | extern int iwl5000_calc_rssi(struct iwl_priv *priv, |
87 | struct iwl_rx_phy_res *rx_resp); | 87 | struct iwl_rx_phy_res *rx_resp); |
88 | extern int iwl5000_apm_init(struct iwl_priv *priv); | 88 | extern int iwl5000_apm_init(struct iwl_priv *priv); |
89 | extern int iwl5000_apm_reset(struct iwl_priv *priv); | ||
90 | extern void iwl5000_nic_config(struct iwl_priv *priv); | 89 | extern void iwl5000_nic_config(struct iwl_priv *priv); |
91 | extern u16 iwl5000_eeprom_calib_version(struct iwl_priv *priv); | 90 | extern u16 iwl5000_eeprom_calib_version(struct iwl_priv *priv); |
92 | extern const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv, | 91 | extern const u8 *iwl5000_eeprom_query_addr(const struct iwl_priv *priv, |