[source] lantiq: drop duplicate and now unused "lantiq, eth-mac" binding
LEDE Commits
lede-commits at lists.infradead.org
Wed Aug 10 02:16:42 PDT 2016
blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=47d39094150c59d59b0c47104d6d57ddaa39e465
commit 47d39094150c59d59b0c47104d6d57ddaa39e465
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Tue Aug 2 22:26:02 2016 +0200
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 at kresin.me>
---
...-lantiq-wifi-and-ethernet-eeprom-handling.patch | 53 +---------------------
1 file changed, 1 insertion(+), 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 6cf1b7c..7a97815 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 at 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 at openwrt.org>
+ *
@@ -345,8 +345,6 @@ Signed-off-by: John Crispin <blogic at 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 at 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(ð_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 @@
More information about the lede-commits
mailing list