aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/mvneta.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-05-16 10:14:06 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-16 17:19:24 -0400
commit83895bedeee6fbf56d887af4280bf9edcc80da60 (patch)
tree2c1352e6646a6ae481b30c72ece99fdb36842c65 /drivers/net/ethernet/marvell/mvneta.c
parent3be2a49e5c08d268f8af0dd4fe89a24ea8cdc339 (diff)
net: mvneta: add support for fixed links
Following the introduction of of_phy_register_fixed_link(), this patch introduces fixed link support in the mvneta driver, for Marvell Armada 370/XP SOCs. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta.c')
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 72bc47f2d2e9..c7cbaf3b4afe 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2797,9 +2797,22 @@ static int mvneta_probe(struct platform_device *pdev)
2797 2797
2798 phy_node = of_parse_phandle(dn, "phy", 0); 2798 phy_node = of_parse_phandle(dn, "phy", 0);
2799 if (!phy_node) { 2799 if (!phy_node) {
2800 dev_err(&pdev->dev, "no associated PHY\n"); 2800 if (!of_phy_is_fixed_link(dn)) {
2801 err = -ENODEV; 2801 dev_err(&pdev->dev, "no PHY specified\n");
2802 goto err_free_irq; 2802 err = -ENODEV;
2803 goto err_free_irq;
2804 }
2805
2806 err = of_phy_register_fixed_link(dn);
2807 if (err < 0) {
2808 dev_err(&pdev->dev, "cannot register fixed PHY\n");
2809 goto err_free_irq;
2810 }
2811
2812 /* In the case of a fixed PHY, the DT node associated
2813 * to the PHY is the Ethernet MAC DT node.
2814 */
2815 phy_node = dn;
2803 } 2816 }
2804 2817
2805 phy_mode = of_get_phy_mode(dn); 2818 phy_mode = of_get_phy_mode(dn);