net: ibm: emac: replace custom PHY_MODE_* macros
The ibm_emac driver predates the PHY_INTERFACE_MODE_* enums by a few years. And while the driver has been retrofitted to use the PHYLIB, the old definitions have stuck around to this day. This patch replaces all occurences of PHY_MODE_* with the respective equivalent PHY_INTERFACE_MODE_* enum. And finally, it purges the old macros for good. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
49dd19bf74
commit
78b69921a1
@@ -96,7 +96,7 @@ int emac_mii_reset_gpcs(struct mii_phy *phy)
|
||||
if ((val & BMCR_ISOLATE) && limit > 0)
|
||||
gpcs_phy_write(phy, MII_BMCR, val & ~BMCR_ISOLATE);
|
||||
|
||||
if (limit > 0 && phy->mode == PHY_MODE_SGMII) {
|
||||
if (limit > 0 && phy->mode == PHY_INTERFACE_MODE_SGMII) {
|
||||
/* Configure GPCS interface to recommended setting for SGMII */
|
||||
gpcs_phy_write(phy, 0x04, 0x8120); /* AsymPause, FDX */
|
||||
gpcs_phy_write(phy, 0x07, 0x2801); /* msg_pg, toggle */
|
||||
@@ -313,16 +313,16 @@ static int cis8201_init(struct mii_phy *phy)
|
||||
epcr &= ~EPCR_MODE_MASK;
|
||||
|
||||
switch (phy->mode) {
|
||||
case PHY_MODE_TBI:
|
||||
case PHY_INTERFACE_MODE_TBI:
|
||||
epcr |= EPCR_TBI_MODE;
|
||||
break;
|
||||
case PHY_MODE_RTBI:
|
||||
case PHY_INTERFACE_MODE_RTBI:
|
||||
epcr |= EPCR_RTBI_MODE;
|
||||
break;
|
||||
case PHY_MODE_GMII:
|
||||
case PHY_INTERFACE_MODE_GMII:
|
||||
epcr |= EPCR_GMII_MODE;
|
||||
break;
|
||||
case PHY_MODE_RGMII:
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
default:
|
||||
epcr |= EPCR_RGMII_MODE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user