igb: remove microwire support from igb
authorAlexander Duyck <alexander.h.duyck@intel.com>
Mon, 5 Oct 2009 06:34:44 +0000 (06:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Oct 2009 21:59:22 +0000 (14:59 -0700)
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>
drivers/net/igb/e1000_hw.h
drivers/net/igb/e1000_nvm.c

index fad7cf5..2dc9294 100644 (file)
@@ -74,7 +74,6 @@ enum e1000_nvm_type {
        e1000_nvm_unknown = 0,
        e1000_nvm_none,
        e1000_nvm_eeprom_spi,
-       e1000_nvm_eeprom_microwire,
        e1000_nvm_flash_hw,
        e1000_nvm_flash_sw
 };
@@ -83,8 +82,6 @@ enum e1000_nvm_override {
        e1000_nvm_override_none = 0,
        e1000_nvm_override_spi_small,
        e1000_nvm_override_spi_large,
-       e1000_nvm_override_microwire_small,
-       e1000_nvm_override_microwire_large
 };
 
 enum e1000_phy_type {
index a88bfe2..d83b77f 100644 (file)
@@ -78,9 +78,7 @@ static void igb_shift_out_eec_bits(struct e1000_hw *hw, u16 data, u16 count)
        u32 mask;
 
        mask = 0x01 << (count - 1);
-       if (nvm->type == e1000_nvm_eeprom_microwire)
-               eecd &= ~E1000_EECD_DO;
-       else if (nvm->type == e1000_nvm_eeprom_spi)
+       if (nvm->type == e1000_nvm_eeprom_spi)
                eecd |= E1000_EECD_DO;
 
        do {
@@ -220,22 +218,7 @@ static void igb_standby_nvm(struct e1000_hw *hw)
        struct e1000_nvm_info *nvm = &hw->nvm;
        u32 eecd = rd32(E1000_EECD);
 
-       if (nvm->type == e1000_nvm_eeprom_microwire) {
-               eecd &= ~(E1000_EECD_CS | E1000_EECD_SK);
-               wr32(E1000_EECD, eecd);
-               wrfl();
-               udelay(nvm->delay_usec);
-
-               igb_raise_eec_clk(hw, &eecd);
-
-               /* Select EEPROM */
-               eecd |= E1000_EECD_CS;
-               wr32(E1000_EECD, eecd);
-               wrfl();
-               udelay(nvm->delay_usec);
-
-               igb_lower_eec_clk(hw, &eecd);
-       } else if (nvm->type == e1000_nvm_eeprom_spi) {
+       if (nvm->type == e1000_nvm_eeprom_spi) {
                /* Toggle CS to flush commands */
                eecd |= E1000_EECD_CS;
                wr32(E1000_EECD, eecd);
@@ -263,12 +246,6 @@ static void e1000_stop_nvm(struct e1000_hw *hw)
                /* Pull CS high */
                eecd |= E1000_EECD_CS;
                igb_lower_eec_clk(hw, &eecd);
-       } else if (hw->nvm.type == e1000_nvm_eeprom_microwire) {
-               /* CS on Microcwire is active-high */
-               eecd &= ~(E1000_EECD_CS | E1000_EECD_DI);
-               wr32(E1000_EECD, eecd);
-               igb_raise_eec_clk(hw, &eecd);
-               igb_lower_eec_clk(hw, &eecd);
        }
 }
 
@@ -304,14 +281,7 @@ static s32 igb_ready_nvm_eeprom(struct e1000_hw *hw)
        u8 spi_stat_reg;
 
 
-       if (nvm->type == e1000_nvm_eeprom_microwire) {
-               /* Clear SK and DI */
-               eecd &= ~(E1000_EECD_DI | E1000_EECD_SK);
-               wr32(E1000_EECD, eecd);
-               /* Set CS */
-               eecd |= E1000_EECD_CS;
-               wr32(E1000_EECD, eecd);
-       } else if (nvm->type == e1000_nvm_eeprom_spi) {
+       if (nvm->type == e1000_nvm_eeprom_spi) {
                /* Clear SK and CS */
                eecd &= ~(E1000_EECD_CS | E1000_EECD_SK);
                wr32(E1000_EECD, eecd);