diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-06-17 15:13:10 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-06-17 15:13:10 +0000 |
commit | d775e4ef00e08c839a41e101552be171ff638d3d (patch) | |
tree | 4024679a777f738166057959372d0706830fcd7e /target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch | |
parent | 099d998fcf21c80e25a9518607285d1437d89be9 (diff) | |
download | upstream-d775e4ef00e08c839a41e101552be171ff638d3d.tar.gz upstream-d775e4ef00e08c839a41e101552be171ff638d3d.tar.bz2 upstream-d775e4ef00e08c839a41e101552be171ff638d3d.zip |
preliminary support for the WRT1900AC (work in progress)
SVN-Revision: 41232
Diffstat (limited to 'target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch')
-rw-r--r-- | target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch b/target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch new file mode 100644 index 0000000000..5df6757d68 --- /dev/null +++ b/target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch @@ -0,0 +1,40 @@ +From 83895bedeee6fbf56d887af4280bf9edcc80da60 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Date: Fri, 16 May 2014 16:14:06 +0200 +Subject: 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> + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -2808,9 +2808,22 @@ static int mvneta_probe(struct platform_ + + phy_node = of_parse_phandle(dn, "phy", 0); + if (!phy_node) { +- dev_err(&pdev->dev, "no associated PHY\n"); +- err = -ENODEV; +- goto err_free_irq; ++ if (!of_phy_is_fixed_link(dn)) { ++ dev_err(&pdev->dev, "no PHY specified\n"); ++ err = -ENODEV; ++ goto err_free_irq; ++ } ++ ++ err = of_phy_register_fixed_link(dn); ++ if (err < 0) { ++ dev_err(&pdev->dev, "cannot register fixed PHY\n"); ++ goto err_free_irq; ++ } ++ ++ /* In the case of a fixed PHY, the DT node associated ++ * to the PHY is the Ethernet MAC DT node. ++ */ ++ phy_node = dn; + } + + phy_mode = of_get_phy_mode(dn); |