1 From 83895bedeee6fbf56d887af4280bf9edcc80da60 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Fri, 16 May 2014 16:14:06 +0200
4 Subject: net: mvneta: add support for fixed links
6 Following the introduction of of_phy_register_fixed_link(), this patch
7 introduces fixed link support in the mvneta driver, for Marvell Armada
10 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 --- a/drivers/net/ethernet/marvell/mvneta.c
14 +++ b/drivers/net/ethernet/marvell/mvneta.c
15 @@ -2808,9 +2808,22 @@ static int mvneta_probe(struct platform_
17 phy_node = of_parse_phandle(dn, "phy", 0);
19 - dev_err(&pdev->dev, "no associated PHY\n");
22 + if (!of_phy_is_fixed_link(dn)) {
23 + dev_err(&pdev->dev, "no PHY specified\n");
28 + err = of_phy_register_fixed_link(dn);
30 + dev_err(&pdev->dev, "cannot register fixed PHY\n");
34 + /* In the case of a fixed PHY, the DT node associated
35 + * to the PHY is the Ethernet MAC DT node.
40 phy_mode = of_get_phy_mode(dn);