net: pch_gbe: Remove PCH_GBE_MAC_IFOP_RGMII define
authorPaul Burton <paul.burton@mips.com>
Sat, 23 Jun 2018 03:17:49 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Jun 2018 11:52:08 +0000 (20:52 +0900)
The pch_gbe driver currently presumes that the PHY is connected using
RGMII, and would need further work to support other buses. It includes a
define which is always set that conditionalises some of the
RGMII-specific code regardless. Remove it. If we do ever support
different MII buses then preprocessor defines won't be the best way to
select between them anyway.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h

index 5846e8cf1750195da853ef7e5cbf4d0b372cd208..11c42aa42b8acd1f81e4b97534a09afcfde9db29 100644 (file)
@@ -366,9 +366,7 @@ static void pch_gbe_mac_reset_hw(struct pch_gbe_hw *hw)
        /* Read the MAC address. and store to the private data */
        pch_gbe_mac_read_mac_addr(hw);
        iowrite32(PCH_GBE_ALL_RST, &hw->reg->RESET);
-#ifdef PCH_GBE_MAC_IFOP_RGMII
        iowrite32(PCH_GBE_MODE_GMII_ETHER, &hw->reg->MODE);
-#endif
        pch_gbe_wait_clr_bit(&hw->reg->RESET, PCH_GBE_ALL_RST);
        /* Setup the receive addresses */
        pch_gbe_mac_mar_set(hw, hw->mac.addr, 0);
@@ -776,9 +774,7 @@ void pch_gbe_reset(struct pch_gbe_adapter *adapter)
        }
        pch_gbe_phy_init_setting(hw);
        /* Setup Mac interface option RGMII */
-#ifdef PCH_GBE_MAC_IFOP_RGMII
        pch_gbe_phy_set_rgmii(hw);
-#endif
 }
 
 /**
@@ -1044,7 +1040,6 @@ static void pch_gbe_set_rgmii_ctrl(struct pch_gbe_adapter *adapter, u16 speed,
        unsigned long rgmii = 0;
 
        /* Set the RGMII control. */
-#ifdef PCH_GBE_MAC_IFOP_RGMII
        switch (speed) {
        case SPEED_10:
                rgmii = (PCH_GBE_RGMII_RATE_2_5M |
@@ -1060,10 +1055,6 @@ static void pch_gbe_set_rgmii_ctrl(struct pch_gbe_adapter *adapter, u16 speed,
                break;
        }
        iowrite32(rgmii, &hw->reg->RGMII_CTRL);
-#else  /* GMII */
-       rgmii = 0;
-       iowrite32(rgmii, &hw->reg->RGMII_CTRL);
-#endif
 }
 static void pch_gbe_set_mode(struct pch_gbe_adapter *adapter, u16 speed,
                              u16 duplex)
index efb955be8cacec1d70d8978300114e672c638166..23ac38711619207c93e4a5e378c85298b8145595 100644 (file)
@@ -21,7 +21,6 @@
 
 #define PCH_GBE_PHY_REGS_LEN           32
 #define        PCH_GBE_PHY_RESET_DELAY_US      10
-#define PCH_GBE_MAC_IFOP_RGMII
 
 s32 pch_gbe_phy_get_id(struct pch_gbe_hw *hw);
 s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data);