lantiq: drop duplicate and now unused "lantiq, eth-mac" binding
authorMathias Kresin <dev@kresin.me>
Tue, 2 Aug 2016 20:26:02 +0000 (22:26 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 10 Aug 2016 00:04:31 +0000 (02:04 +0200)
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>
target/linux/lantiq/patches-4.4/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch

index 6cf1b7c9cd3638a1447dea9eb65c7d301c04f959..7a97815b5420f56e9f11d0223a6584d09ad60196 100644 (file)
@@ -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 @@