From: Aaro Koskinen Date: Sun, 14 Feb 2016 00:45:30 +0000 (+0200) Subject: staging: octeon: support fixed-link phys X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a25e278020bf4cf1d8183bb81f86ec7d73d16dca;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c index 55abd83c38b6..0ac11b1221b7 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;