Commit 41fd60fa authored by Paul Burton's avatar Paul Burton Committed by David S. Miller

net: pch_gbe: Remove PCH_GBE_MAC_IFOP_RGMII define

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: default avatarPaul Burton <paul.burton@mips.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c63ebdf0
...@@ -366,9 +366,7 @@ static void pch_gbe_mac_reset_hw(struct pch_gbe_hw *hw) ...@@ -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 */ /* Read the MAC address. and store to the private data */
pch_gbe_mac_read_mac_addr(hw); pch_gbe_mac_read_mac_addr(hw);
iowrite32(PCH_GBE_ALL_RST, &hw->reg->RESET); iowrite32(PCH_GBE_ALL_RST, &hw->reg->RESET);
#ifdef PCH_GBE_MAC_IFOP_RGMII
iowrite32(PCH_GBE_MODE_GMII_ETHER, &hw->reg->MODE); iowrite32(PCH_GBE_MODE_GMII_ETHER, &hw->reg->MODE);
#endif
pch_gbe_wait_clr_bit(&hw->reg->RESET, PCH_GBE_ALL_RST); pch_gbe_wait_clr_bit(&hw->reg->RESET, PCH_GBE_ALL_RST);
/* Setup the receive addresses */ /* Setup the receive addresses */
pch_gbe_mac_mar_set(hw, hw->mac.addr, 0); pch_gbe_mac_mar_set(hw, hw->mac.addr, 0);
...@@ -776,9 +774,7 @@ void pch_gbe_reset(struct pch_gbe_adapter *adapter) ...@@ -776,9 +774,7 @@ void pch_gbe_reset(struct pch_gbe_adapter *adapter)
} }
pch_gbe_phy_init_setting(hw); pch_gbe_phy_init_setting(hw);
/* Setup Mac interface option RGMII */ /* Setup Mac interface option RGMII */
#ifdef PCH_GBE_MAC_IFOP_RGMII
pch_gbe_phy_set_rgmii(hw); 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, ...@@ -1044,7 +1040,6 @@ static void pch_gbe_set_rgmii_ctrl(struct pch_gbe_adapter *adapter, u16 speed,
unsigned long rgmii = 0; unsigned long rgmii = 0;
/* Set the RGMII control. */ /* Set the RGMII control. */
#ifdef PCH_GBE_MAC_IFOP_RGMII
switch (speed) { switch (speed) {
case SPEED_10: case SPEED_10:
rgmii = (PCH_GBE_RGMII_RATE_2_5M | 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, ...@@ -1060,10 +1055,6 @@ static void pch_gbe_set_rgmii_ctrl(struct pch_gbe_adapter *adapter, u16 speed,
break; break;
} }
iowrite32(rgmii, &hw->reg->RGMII_CTRL); 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, static void pch_gbe_set_mode(struct pch_gbe_adapter *adapter, u16 speed,
u16 duplex) u16 duplex)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define PCH_GBE_PHY_REGS_LEN 32 #define PCH_GBE_PHY_REGS_LEN 32
#define PCH_GBE_PHY_RESET_DELAY_US 10 #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_get_id(struct pch_gbe_hw *hw);
s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data); s32 pch_gbe_phy_read_reg_miic(struct pch_gbe_hw *hw, u32 offset, u16 *data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment