[PATCH 1/5] phy: adin: remove broken support for adi, phy-mode-override

Josua Mayer josua at solid-run.com
Sun May 1 14:41:27 CEST 2022


The adin_get_phy_mode_override function does not compile, because it is
missing both declaration and implementation of
phy_get_interface_by_name.

Remove the whole function for now, since the missing implementation is
not included in mainline Linux - and thus can not be copied.

Signed-off-by: Josua Mayer <josua at solid-run.com>
---
 drivers/net/phy/adin.c | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c
index cff841ab3d..2433e76fea 100644
--- a/drivers/net/phy/adin.c
+++ b/drivers/net/phy/adin.c
@@ -94,35 +94,6 @@ static u32 adin_get_reg_value(struct phy_device *phydev,
 	return rc;
 }
 
-/**
- * adin_get_phy_mode_override - Get phy-mode override for adin PHY
- *
- * The function gets phy-mode string from property 'adi,phy-mode-override'
- * and return its index in phy_interface_strings table, or -1 in error case.
- */
-int adin_get_phy_mode_override(struct phy_device *phydev)
-{
-	ofnode node = phy_get_ofnode(phydev);
-	const char *phy_mode_override;
-	const char *prop_phy_mode_override = "adi,phy-mode-override";
-	int override_interface;
-
-	phy_mode_override = ofnode_read_string(node, prop_phy_mode_override);
-	if (!phy_mode_override)
-		return -ENODEV;
-
-	debug("%s: %s = '%s'\n",
-	      __func__, prop_phy_mode_override, phy_mode_override);
-
-	override_interface = phy_get_interface_by_name(phy_mode_override);
-
-	if (override_interface < 0)
-		printf("%s: %s = '%s' is not valid\n",
-		       __func__, prop_phy_mode_override, phy_mode_override);
-
-	return override_interface;
-}
-
 static u16 adin_ext_read(struct phy_device *phydev, const u32 regnum)
 {
 	u16 val;
@@ -148,11 +119,6 @@ static int adin_config_rgmii_mode(struct phy_device *phydev)
 {
 	u16 reg_val;
 	u32 val;
-	int phy_mode_override = adin_get_phy_mode_override(phydev);
-
-	if (phy_mode_override >= 0) {
-		phydev->interface = (phy_interface_t) phy_mode_override;
-	}
 
 	reg_val = adin_ext_read(phydev, ADIN1300_GE_RGMII_CFG);
 
-- 
2.34.1



More information about the U-Boot mailing list