Skip to content

Commit

Permalink
staging: octeon: support fixed-link phys
Browse files Browse the repository at this point in the history
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@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
aakoskin authored and gregkh committed Feb 15, 2016
1 parent e6ceec8 commit a25e278
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/staging/octeon/ethernet-mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a25e278

Please sign in to comment.