[PATCH] staging: octeon: support fixed-link phys
Aaro Koskinen
aaro.koskinen at iki.fi
Sun Feb 14 00:45:30 UTC 2016
Support fixed-link PHYs. This allows to remove some of the board-specific
link cvmx_helper code in the future.
Signed-off-by: Aaro Koskinen <aaro.koskinen at iki.fi>
---
drivers/staging/octeon/ethernet-mdio.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 55abd83..0ac11b1 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -181,6 +181,15 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
goto no_phy;
phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
+ if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
+ int rc;
+
+ rc = of_phy_register_fixed_link(priv->of_node);
+ if (rc)
+ return rc;
+
+ phy_node = of_node_get(priv->of_node);
+ }
if (!phy_node)
goto no_phy;
--
2.4.0
More information about the devel
mailing list