aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-12-10 20:56:31 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2018-01-22 22:54:17 +0100
commitb1c82cbd51335ca4d0e8916c3f90978f75c2889b (patch)
tree8f5909796e23d87153d812954458b615758f13cc /target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch
parentad2b3bf310f7642bd9b5f30c6c7c17a343749f46 (diff)
downloadupstream-b1c82cbd51335ca4d0e8916c3f90978f75c2889b.tar.gz
upstream-b1c82cbd51335ca4d0e8916c3f90978f75c2889b.tar.bz2
upstream-b1c82cbd51335ca4d0e8916c3f90978f75c2889b.zip
sunxi: backport stmmac network patches
Ethernet support was initial added in kernel 4.13, but deactivated before the final release. This is backports the changes which are activating it again from kernel 4.15. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch')
-rw-r--r--target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch b/target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch
new file mode 100644
index 0000000000..b8b5b53b3f
--- /dev/null
+++ b/target/linux/sunxi/patches-4.14/004-net-stmmac-dwmac-sun8i-fix-allwinner-leds-active-low.patch
@@ -0,0 +1,29 @@
+From 1c08ac0c4bd8e9d66c4dde29bc496c3b430dd028 Mon Sep 17 00:00:00 2001
+From: Corentin Labbe <clabbe.montjoie@gmail.com>
+Date: Tue, 28 Nov 2017 17:48:22 +0100
+Subject: net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
+
+The driver expect "allwinner,leds-active-low" to be in PHY node, but
+the binding doc expect it to be in MAC node.
+
+Since all board DT use it also in MAC node, the driver need to search
+allwinner,leds-active-low in MAC node.
+
+Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+@@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct
+ val, reg);
+
+ if (gmac->variant->soc_has_internal_phy) {
+- if (of_property_read_bool(priv->plat->phy_node,
+- "allwinner,leds-active-low"))
++ if (of_property_read_bool(node, "allwinner,leds-active-low"))
+ reg |= H3_EPHY_LED_POL;
+ else
+ reg &= ~H3_EPHY_LED_POL;