From 47d39094150c59d59b0c47104d6d57ddaa39e465 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Tue, 2 Aug 2016 22:26:02 +0200 Subject: [PATCH] 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 --- ...iq-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 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 +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 + * @@ -345,8 +345,6 @@ Signed-off-by: John Crispin + */ + +#include -+#include -+#include +#include + +static u8 eth_mac[6]; @@ -363,55 +361,6 @@ Signed-off-by: John Crispin + 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 @@ -- 2.25.1