aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2014-03-06 00:09:30 +0000
committerZoltan HERPAI <wigyori@uid0.hu>2014-03-06 00:09:30 +0000
commita8ab50ee77d004e4a00cd6280cc1b542e57054b1 (patch)
tree0a2be71f002d9dd9084a172a72bef22388f0ca0e /target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch
parent8911fab5ade7400cdb42c43f884b4a10141c159e (diff)
downloadupstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.gz
upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.tar.bz2
upstream-a8ab50ee77d004e4a00cd6280cc1b542e57054b1.zip
sunxi: driver refresh for 3.13
- update gmac / mmc / usb / ahci drivers to follow mainline dev trees - add driver for spi - update clock support - update a31 support - move to new DT compats where appropriate - re-order patchqueue where needed - verified working a20 smp - move most DTSes off files/ - update defconfig Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39782 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch')
-rw-r--r--target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch b/target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch
new file mode 100644
index 0000000000..5b9b09c672
--- /dev/null
+++ b/target/linux/sunxi/patches-3.13/153-5-stmmac-deprecate-snps-phy-addr.patch
@@ -0,0 +1,55 @@
+From 436f7ecdcc08f71ddc106b7bbe3bcbf1785f3bff Mon Sep 17 00:00:00 2001
+From: Chen-Yu Tsai <wens@csie.org>
+Date: Fri, 17 Jan 2014 21:24:45 +0800
+Subject: [PATCH] net: stmmac: Deprecate snps, phy-addr and auto-detect PHY
+ address
+
+The snps,phy-addr device tree property is non-standard, and should be
+removed in favor of proper phy node support. Remove it from the binding
+documents and warn if the property is still used.
+
+Most PHYs respond to address 0, but a few don't, so auto-detect PHY
+address by default, to make up for the lack of explicit address selection.
+
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ Documentation/devicetree/bindings/net/stmmac.txt | 1 -
+ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 ++++++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
+index d132513..aefb639 100644
+--- a/Documentation/devicetree/bindings/net/stmmac.txt
++++ b/Documentation/devicetree/bindings/net/stmmac.txt
+@@ -12,7 +12,6 @@ Required properties:
+ property
+ - phy-mode: String, operation mode of the PHY interface.
+ Supported values are: "mii", "rmii", "gmii", "rgmii".
+-- snps,phy-addr phy address to connect to.
+ - snps,reset-gpio gpio number for phy reset.
+ - snps,reset-active-low boolean flag to indicate if phy reset is active low.
+ - snps,reset-delays-us is triplet of delays
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+index 634260e..82110f1 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+@@ -50,7 +50,14 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
+ if (plat->bus_id < 0)
+ plat->bus_id = 0;
+
+- of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr);
++ /* Default to phy auto-detection */
++ plat->phy_addr = -1;
++
++ /* "snps,phy-addr" is not a standard property. Mark it as deprecated
++ * and warn of its use. Remove this when phy node support is added.
++ */
++ if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
++ dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
+
+ plat->mdio_bus_data = devm_kzalloc(&pdev->dev,
+ sizeof(struct stmmac_mdio_bus_data),
+--
+1.8.5.5
+