From patchwork Sun Jan 18 05:47:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gimpelevich X-Patchwork-Id: 430155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 63DC0140185 for ; Sun, 18 Jan 2015 17:00:18 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 41ACB28BC41; Sun, 18 Jan 2015 06:57:55 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 4F5AC28054F for ; Sun, 18 Jan 2015 06:57:47 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -7.6 Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 18 Jan 2015 06:57:47 +0100 (CET) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YCiu3-0002vJ-8e for openwrt-devel@lists.openwrt.org; Sun, 18 Jan 2015 07:00:03 +0100 Received: from 108-169-6-253.dsl.dynamic.fusionbroadband.com ([108.169.6.253]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Jan 2015 07:00:03 +0100 Received: from daniel by 108-169-6-253.dsl.dynamic.fusionbroadband.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Jan 2015 07:00:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: openwrt-devel@lists.openwrt.org From: Daniel Gimpelevich Date: Sat, 17 Jan 2015 21:47:04 -0800 Lines: 152 Message-ID: <1421560024.6126.26.camel@chimera> Mime-Version: 1.0 X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 108-169-6-253.dsl.dynamic.fusionbroadband.com X-Mailer: Evolution 3.10.4-0ubuntu2 Subject: [OpenWrt-Devel] [PATCH 3/4] lantiq: Restore call to orphaned etop function X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" It seems the call to ltq_get_eth_mac() disappeared at some point. This patch puts it where it currently most makes sense. Signed-off-by: Daniel Gimpelevich --- a/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (revision 44023) +++ b/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch (working copy) @@ -19,8 +19,10 @@ create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c create mode 100644 arch/mips/lantiq/xway/rt_eep.c ---- /dev/null -+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,6 @@ +#ifndef _PCI_ATH_FIXUP +#define _PCI_ATH_FIXUP @@ -28,9 +30,11 @@ +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init; + +#endif /* _PCI_ATH_FIXUP */ ---- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h -@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, +Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h +=================================================================== +--- linux-3.14.28.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2015-01-17 10:55:03.337443971 -0800 ++++ linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2015-01-17 10:55:03.329443942 -0800 +@@ -90,5 +90,8 @@ extern void ltq_pmu_enable(unsigned int module); extern void ltq_pmu_disable(unsigned int module); @@ -39,9 +43,11 @@ + #endif /* CONFIG_SOC_TYPE_XWAY */ #endif /* _LTQ_XWAY_H__ */ ---- a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile -@@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o +Index: linux-3.14.28/arch/mips/lantiq/xway/Makefile +=================================================================== +--- linux-3.14.28.orig/arch/mips/lantiq/xway/Makefile 2015-01-17 10:55:03.337443971 -0800 ++++ linux-3.14.28/arch/mips/lantiq/xway/Makefile 2015-01-17 11:58:16.000000000 -0800 +@@ -2,4 +2,7 @@ obj-y += vmmc.o tffs.o @@ -49,8 +55,10 @@ +obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o + obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o ---- /dev/null -+++ b/arch/mips/lantiq/xway/ath_eep.c +Index: linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,282 @@ +/* + * Copyright (C) 2011 Luca Olivetti @@ -334,8 +342,10 @@ + return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe); +} +device_initcall(of_ath5k_eeprom_init); ---- /dev/null -+++ b/arch/mips/lantiq/xway/eth_mac.c +Index: linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c 2015-01-17 11:14:42.823292726 -0800 @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2012 John Crispin @@ -413,8 +423,10 @@ + 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 +Index: linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,109 @@ +/* + * Atheros AP94 reference board PCI initialization @@ -525,8 +537,10 @@ + ath_fixups[ath_num_fixups].cal_data = cal_data; + ath_num_fixups++; +} ---- /dev/null -+++ b/arch/mips/lantiq/xway/rt_eep.c +Index: linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c 2015-01-17 10:55:03.329443942 -0800 @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011 John Crispin @@ -588,3 +602,17 @@ + return platform_driver_probe(&ralink_eeprom_driver, of_ralink_eeprom_probe); +} +device_initcall(of_ralink_eeprom_init); +Index: linux-3.14.28/drivers/net/ethernet/lantiq_etop.c +=================================================================== +--- linux-3.14.28.orig/drivers/net/ethernet/lantiq_etop.c 2015-01-17 11:52:03.818405214 -0800 ++++ linux-3.14.28/drivers/net/ethernet/lantiq_etop.c 2015-01-17 12:02:20.905465188 -0800 +@@ -843,6 +843,9 @@ + + if (priv->mac) + memcpy(&mac.sa_data, priv->mac, ETH_ALEN); ++ else ++ memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN); ++ + if (!is_valid_ether_addr(mac.sa_data)) { + pr_warn("etop: invalid MAC, using random\n"); + random_ether_addr(mac.sa_data);