From patchwork Thu May 19 18:20:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 624181 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r9fch08Yvz9sdg for ; Fri, 20 May 2016 04:25:07 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=open-mesh-com.20150623.gappssmtp.com header.i=@open-mesh-com.20150623.gappssmtp.com header.b=lSAqe3Df; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A5309B91FFB; Thu, 19 May 2016 20:22:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Thu, 19 May 2016 20:22:10 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6B866B91F95 for ; Thu, 19 May 2016 20:21:49 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .open-mesh. - helo: .mail-wm0-f42.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 19 May 2016 20:21:48 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id a17so138674809wme.0 for ; Thu, 19 May 2016 11:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=open-mesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qS2azbNksrEu07T3LzWt7lnP8hkAoTneEIi0Yg6bxS4=; b=lSAqe3DfbXLI+GCX6qaT6v8h5n3sznSfOe8lK7du0yYsvY+2ghfEhbCsGLuTZWEp+c DQC3RdiCwXHm0Yhr0sAKCt6PpCCTI737u+mVI+SKKn/4KSwRtryZh2YfmXZh2s3UtF3Q HY/5h1euMOTqq2R4cNn7jZj1UFcZ4s7tbFaysVRcaDgGeZbAZA1kPXnrH5RGpjb2b+D5 ChofF1He7DCePMoxzFpfdOC6Y44EAom3RO8CrlH8wl7/pvgvPtZR03kCiEjzXAgS8XGp WE92U1rdSuXgsW4R6pKGSOkp0NNN6xHXB3mJsaGvXC5MsGEGmVn7u55owjOwJRwZw8AY DOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qS2azbNksrEu07T3LzWt7lnP8hkAoTneEIi0Yg6bxS4=; b=blznxlmvaJkY01vtmhDZmOtiP/VffekfLNpe2e/k0pmbPvy1RUvzsanO72U5EKkUHl 28ZdOPmW2jGh1aYXCdXT6BYdpECehRR5q16BSzdiQFAebL/DyapjGuqXX8rQ1VxhOyGR HeB4B+pikvxnfgbRPcgs/G0m9SFCBBKXVBZtPmSDFHGpxAEXF4FMZlN6AN68N+lYUH+X 5m2kU52ZXr4qtNPqc8OZiDB034DbelYAPPewKD35ls9QFWXo0KTnnRMF2no4GXFmgKdF LKGArlkrGB7M5LVVMgvYIKRqODCcNVugUOU6UD4sJvODj5kBEBTWNHai9BuJZunEeINa G8uw== X-Gm-Message-State: AOPr4FWvX2XUPeCjOAVh7t2HYNCSZ72s9fA1kW5t0IvOfbt7e2vt+byVT/ko4eeZvQPW7zQj X-Received: by 10.28.224.70 with SMTP id x67mr37477734wmg.78.1463682108551; Thu, 19 May 2016 11:21:48 -0700 (PDT) Received: from sven-desktop.home.narfation.org (p579E6DC9.dip0.t-ipconnect.de. [87.158.109.201]) by smtp.gmail.com with ESMTPSA id c7sm10219036wji.38.2016.05.19.11.21.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 11:21:48 -0700 (PDT) From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Date: Thu, 19 May 2016 20:20:53 +0200 Message-Id: <1463682077-19339-10-git-send-email-sven.eckelmann@open-mesh.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1463682077-19339-1-git-send-email-sven.eckelmann@open-mesh.com> References: <1463682077-19339-1-git-send-email-sven.eckelmann@open-mesh.com> Subject: [OpenWrt-Devel] [PATCH CC 10/34] ar71xx: Use *_eth_cfg helper for Open Mesh MR900 boards X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sven Eckelmann MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Sven Eckelmann Backport of r46241 --- .../linux/ar71xx/files/arch/mips/ath79/mach-mr900.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c index fe3e1fa..9c3164d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c @@ -94,24 +94,6 @@ static struct gpio_keys_button mr900_gpio_keys[] __initdata = { }, }; - -static void __init mr900_gmac_setup(void) -{ - void __iomem *base; - u32 t; - - base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); - - t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG); - - t &= ~(QCA955X_ETH_CFG_RGMII_EN | QCA955X_ETH_CFG_GE0_SGMII); - t |= QCA955X_ETH_CFG_RGMII_EN; - - __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG); - - iounmap(base); -} - static void __init mr900_setup(void) { u8 *art = (u8 *)KSEG1ADDR(0x1fff0000); @@ -141,8 +123,7 @@ static void __init mr900_setup(void) } pdata->use_eeprom = true; - mr900_gmac_setup(); - + ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN); ath79_register_mdio(0, 0x0); ath79_init_mac(ath79_eth0_data.mac_addr, art + MR900_MAC0_OFFSET, 0);