Skip to content

Commit a25e278

Browse files
aakoskingregkh
authored andcommitted
staging: octeon: support fixed-link phys
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e6ceec8 commit a25e278

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/staging/octeon/ethernet-mdio.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
181181
goto no_phy;
182182

183183
phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
184+
if (!phy_node && of_phy_is_fixed_link(priv->of_node)) {
185+
int rc;
186+
187+
rc = of_phy_register_fixed_link(priv->of_node);
188+
if (rc)
189+
return rc;
190+
191+
phy_node = of_node_get(priv->of_node);
192+
}
184193
if (!phy_node)
185194
goto no_phy;
186195

0 commit comments

Comments
 (0)