From patchwork Tue Apr 5 13:32:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 606464 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 3qfVDW6qc3z9t3Z for ; Tue, 5 Apr 2016 23:33:31 +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=KC7RqQD/; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6D0C0B91BB0; Tue, 5 Apr 2016 15:32:34 +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=2.4 required=5.0 tests=RDNS_NONE,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Tue, 5 Apr 2016 15:32:34 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 18F21B91BAC for ; Tue, 5 Apr 2016 15:32:33 +0200 (CEST) X-policyd-weight: using cached result; rate: -7 Received: from mail-wm0-f49.google.com (unknown [74.125.82.49]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 5 Apr 2016 15:32:33 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id 127so24736439wmu.1 for ; Tue, 05 Apr 2016 06:32:33 -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=vk1FClMeXQbJX2Oz5p/TvBDvouEM8iVXBi9sU+WnklY=; b=KC7RqQD/aRxjxnOclcdE9VnMpthCCXCUVqC1fs/Ant2CWvD89zvu0ngoDa2dfGJgCi eTOyW6cuUyQzY32QEY3Z5iS7AQRGkWAIoBozsJDnFSvPS2nBNP8tPDEJtROZNagKZT2O CfodSXd8u8kJ2vjeySurKbz9g7Bbgrk9RQinfMqFvsdyxAWM3kkpkaB188JI8LSlkMTv bxu1hhZToiodsMqXqM4lDtkOHmw1rXB3+e5zJt+U5gd6kAvkjAoeevpHZnNM9Q08ZUFm cDiNhLuGwKb5+0KLdZPZcTUWx3KALFnR9sm11jKdqtLZz1d4V8zFP3PkwmCZFPVcUGm+ Ukqg== 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=vk1FClMeXQbJX2Oz5p/TvBDvouEM8iVXBi9sU+WnklY=; b=VmcFwHQsQzvmtfKU+ObxxUR1+mbddeiCunhp/drUcFSc8NyN8+DoDSGUdtRjQPO/6E 3IlREqonCb+8M9/43w47GhHo/V4LTdbeNXI1JRw8BZmSMNOv9KlC/q0Ph3BX5S36ZpLa C+5meIjELc2Hfh6HIoiglafIeWmFyWfO/Vz506Q9c37dlpwYnSCc2dA5SfUyqWDISpwR 20TpC+akK5eNuAXrqrmV6rdKE0uy07BArscsxW+5Djppkk3Tia/+FrItkOUTMRCeZ9wm wY8VnpIXpcKfB8KI37JNeYMmLJW4ETktFZ3yFtJ/EcTmC7JvOkub4GfsdXmF4bKoh787 cJfw== X-Gm-Message-State: AD7BkJLCbxl7mQ/C4wtL0FhFuaqNK+GWKG3kk2mmnN3Zylh2ePgdWQ8MOnNQFE/W1KnmMt7o X-Received: by 10.28.107.13 with SMTP id g13mr18367215wmc.62.1459863152670; Tue, 05 Apr 2016 06:32:32 -0700 (PDT) Received: from sven-desktop.home.narfation.org (x5d84b455.dyn.telefonica.de. [93.132.180.85]) by smtp.gmail.com with ESMTPSA id 7sm19585806wmn.7.2016.04.05.06.32.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 06:32:32 -0700 (PDT) From: Sven Eckelmann X-Google-Original-From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Date: Tue, 5 Apr 2016 15:32:09 +0200 Message-Id: <1459863133-26810-2-git-send-email-sven@open-mesh.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Subject: [OpenWrt-Devel] [RFC v2 2/6] ar71xx: Save GMAC id in ag71xx_platform_data 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 , Antonio Quartulli MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Sven Eckelmann The ag71xx driver must know which GMAC is is currently handling to enable some special workarounds for this GMAC. GMAC0 has some registers on QCA9558 which GMAC1 doesn't have. Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 1 + .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index 09201c9..bfcc82f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -871,6 +871,7 @@ void __init ath79_register_eth(unsigned int id) pdata->max_frame_len = 1540; pdata->desc_pktlen_mask = 0xfff; + pdata->gmac_num = id; err = ath79_setup_phy_if_mode(id, pdata); if (err) { diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h index 4db2c65..5e4edae 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h @@ -38,6 +38,8 @@ struct ag71xx_platform_data { u8 has_ar8216:1; u8 is_qca955x:1; + unsigned int gmac_num; + struct ag71xx_switch_platform_data *switch_data; void (*ddr_flush)(void);