diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2009-10-05 02:34:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-06 17:59:22 -0400 |
commit | 285b4167458ec7cc49008b2e61cbe0362deed335 (patch) | |
tree | 4a64ffe6beea6d65c3c18724f7ecb0e8bae0d37a /drivers/net/igb/e1000_nvm.c | |
parent | 22896639af98ebc721a94ed71fc3acf2fb4a24dc (diff) |
igb: remove microwire support from igb
igb doesn't have any devices that use a microwire interface for NVM. As
such the code related to this can be removed.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/e1000_nvm.c')
-rw-r--r-- | drivers/net/igb/e1000_nvm.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/drivers/net/igb/e1000_nvm.c b/drivers/net/igb/e1000_nvm.c index a88bfe2f1e8f..d83b77fa4038 100644 --- a/drivers/net/igb/e1000_nvm.c +++ b/drivers/net/igb/e1000_nvm.c | |||
@@ -78,9 +78,7 @@ static void igb_shift_out_eec_bits(struct e1000_hw *hw, u16 data, u16 count) | |||
78 | u32 mask; | 78 | u32 mask; |
79 | 79 | ||
80 | mask = 0x01 << (count - 1); | 80 | mask = 0x01 << (count - 1); |
81 | if (nvm->type == e1000_nvm_eeprom_microwire) | 81 | if (nvm->type == e1000_nvm_eeprom_spi) |
82 | eecd &= ~E1000_EECD_DO; | ||
83 | else if (nvm->type == e1000_nvm_eeprom_spi) | ||
84 | eecd |= E1000_EECD_DO; | 82 | eecd |= E1000_EECD_DO; |
85 | 83 | ||
86 | do { | 84 | do { |
@@ -220,22 +218,7 @@ static void igb_standby_nvm(struct e1000_hw *hw) | |||
220 | struct e1000_nvm_info *nvm = &hw->nvm; | 218 | struct e1000_nvm_info *nvm = &hw->nvm; |
221 | u32 eecd = rd32(E1000_EECD); | 219 | u32 eecd = rd32(E1000_EECD); |
222 | 220 | ||
223 | if (nvm->type == e1000_nvm_eeprom_microwire) { | 221 | if (nvm->type == e1000_nvm_eeprom_spi) { |
224 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); | ||
225 | wr32(E1000_EECD, eecd); | ||
226 | wrfl(); | ||
227 | udelay(nvm->delay_usec); | ||
228 | |||
229 | igb_raise_eec_clk(hw, &eecd); | ||
230 | |||
231 | /* Select EEPROM */ | ||
232 | eecd |= E1000_EECD_CS; | ||
233 | wr32(E1000_EECD, eecd); | ||
234 | wrfl(); | ||
235 | udelay(nvm->delay_usec); | ||
236 | |||
237 | igb_lower_eec_clk(hw, &eecd); | ||
238 | } else if (nvm->type == e1000_nvm_eeprom_spi) { | ||
239 | /* Toggle CS to flush commands */ | 222 | /* Toggle CS to flush commands */ |
240 | eecd |= E1000_EECD_CS; | 223 | eecd |= E1000_EECD_CS; |
241 | wr32(E1000_EECD, eecd); | 224 | wr32(E1000_EECD, eecd); |
@@ -263,12 +246,6 @@ static void e1000_stop_nvm(struct e1000_hw *hw) | |||
263 | /* Pull CS high */ | 246 | /* Pull CS high */ |
264 | eecd |= E1000_EECD_CS; | 247 | eecd |= E1000_EECD_CS; |
265 | igb_lower_eec_clk(hw, &eecd); | 248 | igb_lower_eec_clk(hw, &eecd); |
266 | } else if (hw->nvm.type == e1000_nvm_eeprom_microwire) { | ||
267 | /* CS on Microcwire is active-high */ | ||
268 | eecd &= ~(E1000_EECD_CS | E1000_EECD_DI); | ||
269 | wr32(E1000_EECD, eecd); | ||
270 | igb_raise_eec_clk(hw, &eecd); | ||
271 | igb_lower_eec_clk(hw, &eecd); | ||
272 | } | 249 | } |
273 | } | 250 | } |
274 | 251 | ||
@@ -304,14 +281,7 @@ static s32 igb_ready_nvm_eeprom(struct e1000_hw *hw) | |||
304 | u8 spi_stat_reg; | 281 | u8 spi_stat_reg; |
305 | 282 | ||
306 | 283 | ||
307 | if (nvm->type == e1000_nvm_eeprom_microwire) { | 284 | if (nvm->type == e1000_nvm_eeprom_spi) { |
308 | /* Clear SK and DI */ | ||
309 | eecd &= ~(E1000_EECD_DI | E1000_EECD_SK); | ||
310 | wr32(E1000_EECD, eecd); | ||
311 | /* Set CS */ | ||
312 | eecd |= E1000_EECD_CS; | ||
313 | wr32(E1000_EECD, eecd); | ||
314 | } else if (nvm->type == e1000_nvm_eeprom_spi) { | ||
315 | /* Clear SK and CS */ | 285 | /* Clear SK and CS */ |
316 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); | 286 | eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); |
317 | wr32(E1000_EECD, eecd); | 287 | wr32(E1000_EECD, eecd); |