summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2020-06-16 10:41:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-06-17 10:38:07 +0200
commita5364fea692ecc49c5c987d1dfa22e9a262df7c0 (patch)
tree17f251dfa25d72a0b44a6d23a71973697c19d0ff /drivers/net
parente53af5a8cbf5a7b416389761833b08c1440b065d (diff)
downloadbarebox-a5364fea692ecc49c5c987d1dfa22e9a262df7c0.tar.gz
barebox-a5364fea692ecc49c5c987d1dfa22e9a262df7c0.tar.xz
net: phy: port phy_interface_is_rgmii() from kernel
and remove duplicates from other drivers Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/phy/dp83867.c6
-rw-r--r--drivers/net/phy/marvell.c6
2 files changed, 0 insertions, 12 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index b3328b7e44..8e6f198ca2 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -177,12 +177,6 @@ static int dp83867_of_init(struct phy_device *phydev)
&dp83867->fifo_depth);
}
-static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
-{
- return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
- phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
-}
-
static inline bool phy_interface_is_sgmii(struct phy_device *phydev)
{
return phydev->interface == PHY_INTERFACE_MODE_SGMII ||
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 73d6453b36..af39ed68fd 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -168,12 +168,6 @@ static int marvell_read_status(struct phy_device *phydev)
#define MII_88E1510_GEN_CTRL_REG_1 0x14
-static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
-{
- return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
- phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
-};
-
/*
* Set and/or override some configuration registers based on the
* marvell,reg-init property stored in the of_node for the phydev.