1
0
Fork 0

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 <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Aaro Koskinen 2016-02-14 02:45:30 +02:00 committed by Greg Kroah-Hartman
parent e6ceec822a
commit a25e278020
1 changed files with 9 additions and 0 deletions

View File

@ -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;