aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2014-06-17 15:13:10 +0000
committerImre Kaloz <kaloz@openwrt.org>2014-06-17 15:13:10 +0000
commitb3ca5188500e75c541ed7904faf5cdc174d1daf8 (patch)
tree8e49b4fed47204d364c9b2097a3b2b7cd012b2a9 /target/linux/mvebu/patches-3.14/021-mvneta_support_fixed_links.patch
parentf71d455502323e4bce3df847fb5481adcf5602c7 (diff)
downloadmaster-187ad058-b3ca5188500e75c541ed7904faf5cdc174d1daf8.tar.gz
master-187ad058-b3ca5188500e75c541ed7904faf5cdc174d1daf8.tar.bz2
master-187ad058-b3ca5188500e75c541ed7904faf5cdc174d1daf8.zip
[mvebu]: preliminary support for the WRT1900AC (work in progress)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41232 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch40
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);