aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-08-02 22:26:02 +0200
committerJohn Crispin <john@phrozen.org>2016-08-10 02:04:31 +0200
commit47d39094150c59d59b0c47104d6d57ddaa39e465 (patch)
treeebde8ff952f1f0004fa79d83989a3f6655186ead
parent91d5067091b56fa757d08ef3e42c53f2f7294ec4 (diff)
downloadupstream-47d39094150c59d59b0c47104d6d57ddaa39e465.tar.gz
upstream-47d39094150c59d59b0c47104d6d57ddaa39e465.tar.bz2
upstream-47d39094150c59d59b0c47104d6d57ddaa39e465.zip
lantiq: drop duplicate and now unused "lantiq, eth-mac" binding
The device tree binding and the associated code duplicates functionality already patched into the etop driver. The compatible string isn't used any more. Therefore the whole code can be dropped. The "mac-increment" property allowed to increment a mac address received via kernel cmdline. This functionality isn't used by any device and should be added as etop driver device tree property if required again. Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r--target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch53
1 files changed, 1 insertions, 52 deletions
diff --git a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 6cf1b7c9cd..7a97815b54 100644
--- a/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -335,7 +335,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+device_initcall(of_ath5k_eeprom_init);
--- /dev/null
+++ b/arch/mips/lantiq/xway/eth_mac.c
-@@ -0,0 +1,76 @@
+@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2012 John Crispin <blogic@openwrt.org>
+ *
@@ -345,8 +345,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/of_platform.h>
+#include <linux/if_ether.h>
+
+static u8 eth_mac[6];
@@ -363,55 +361,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ return !eth_mac_set;
+}
+early_param("ethaddr", setup_ethaddr);
-+
-+int __init of_eth_mac_probe(struct platform_device *pdev)
-+{
-+ struct device_node *np = pdev->dev.of_node;
-+ struct resource *mac_res;
-+ void __iomem *mac;
-+ u32 mac_inc = 0;
-+
-+ if (eth_mac_set) {
-+ dev_err(&pdev->dev, "mac was already set by bootloader\n");
-+ return -EINVAL;
-+ }
-+ mac_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ if (!mac_res) {
-+ dev_err(&pdev->dev, "failed to load mac\n");
-+ return -EINVAL;
-+ }
-+ if (resource_size(mac_res) != 6) {
-+ dev_err(&pdev->dev, "mac has an invalid size\n");
-+ return -EINVAL;
-+ }
-+ mac = ioremap(mac_res->start, resource_size(mac_res));
-+ memcpy_fromio(eth_mac, mac, 6);
-+
-+ if (!of_property_read_u32(np, "mac-increment", &mac_inc))
-+ eth_mac[5] += mac_inc;
-+
-+ return 0;
-+}
-+
-+static struct of_device_id eth_mac_ids[] = {
-+ { .compatible = "lantiq,eth-mac" },
-+ { /* sentinel */ }
-+};
-+
-+static struct platform_driver eth_mac_driver = {
-+ .driver = {
-+ .name = "lantiq,eth-mac",
-+ .owner = THIS_MODULE,
-+ .of_match_table = of_match_ptr(eth_mac_ids),
-+ },
-+};
-+
-+static int __init of_eth_mac_init(void)
-+{
-+ return platform_driver_probe(&eth_mac_driver, of_eth_mac_probe);
-+}
-+device_initcall(of_eth_mac_init);
--- /dev/null
+++ b/arch/mips/lantiq/xway/pci-ath-fixup.c
@@ -0,0 +1,118 @@