Skip to content

Commit

Permalink
net: davinci_emac: Add support for fixed-link PHY
Browse files Browse the repository at this point in the history
In case the DaVinci Emac is directly connected to a
non-mdio PHY/device, it should be possible to provide
a fixed link configuration in the DT.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Neil Armstrong authored and David S. Miller committed Sep 23, 2015
1 parent b6bd9b5 commit 1bb6aa5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/ti/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,8 +1861,12 @@ davinci_emac_of_get_pdata(struct platform_device *pdev, struct emac_priv *priv)
pdata->no_bd_ram = of_property_read_bool(np, "ti,davinci-no-bd-ram");

priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
if (!priv->phy_node)
pdata->phy_id = NULL;
if (!priv->phy_node) {
if (!of_phy_is_fixed_link(np))
pdata->phy_id = NULL;
else if (of_phy_register_fixed_link(np) >= 0)
priv->phy_node = of_node_get(np);
}

auxdata = pdev->dev.platform_data;
if (auxdata) {
Expand Down

0 comments on commit 1bb6aa5

Please sign in to comment.