From patchwork Tue Apr 5 13:32:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 606463 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 3qfVCT2QYvz9t3Z for ; Tue, 5 Apr 2016 23:32:37 +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=j3pCxFKz; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8F25DB91BA4; Tue, 5 Apr 2016 15:32:30 +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:30 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6875FB91BA3 for ; Tue, 5 Apr 2016 15:32:29 +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-f49.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; 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:28 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id u206so4480088wme.1 for ; Tue, 05 Apr 2016 06:32:28 -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; bh=JRfAR/KpQRTA1fyDiPkREItTYl0RIBwtBRapLSV+hq0=; b=j3pCxFKzXWXx+Ei9SikTIo0B0XDEPJkzoAV6gHO9gX7c3DzGqk+973hHULxVnmwtjf j5ZzochzshXcQ5OFqQf7PmJddvVsKuPDLv4/kHZsoLSrC4Wk2MC2rZC3k8ijG4CVUTyR OL/Yq3rvNKTkPaGe99PYWpHXaomVSkoFbLQK5T/IMLjx4BJMtDyOaIxSNz630VrVDjlK DCE2O4c+DwjOmRDpExkXUnqI9BuRpbGdcK31AyvH9RIM+YdZls/ZTNaGUeylUYQt40DM d/DXwYU0EWfPf4iQDOrs4LxkPJoX0NSaxXgT0A9C4foUIOB+tjoP9rzMtf/bLXDpACJW E49w== 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; bh=JRfAR/KpQRTA1fyDiPkREItTYl0RIBwtBRapLSV+hq0=; b=SPjyVaANplfwbOD49oE44P2TsewxaR92bVUAOuuYxW6AIcmDHp6xPlt7uL4fzEipVj lmZ06R8ou9eG2GKMtuz8kIFracBFUQwV/Bqmuxrluut50WNbaFTzvhfQJmjOAmSSvkIf QrZd1DxvlXcT/SxX74h3aECeAbY1n+IB1PYGjbUMqkwHRSS3RVR/WT5sa8rThBYJgrlM a/OFoj67ADdmkD/tN3y1h1CgRE5GD1ZJWtRiioQJDAN2ULptvl8ZPnn1pODJcA0m0UCQ 9wazmmxvYAGvXp6Tu23kseQ5SB54QeUv3cBOdrBSZHbiI7VSWY5R2kDqh2rTr5qPN1Yu 3zag== X-Gm-Message-State: AD7BkJIRmaycW5rzzZyBfz2zzzwt2DBofjtJWXeaxl7KXxV3ErQs7/21IPaXPPVc3w3RlZoB X-Received: by 10.194.84.100 with SMTP id x4mr25737590wjy.169.1459863147914; Tue, 05 Apr 2016 06:32:27 -0700 (PDT) Received: from sven-desktop.home.narfation.org (x5d84b455.dyn.telefonica.de. [93.132.180.85]) by smtp.gmail.com with ESMTPSA id b1sm34753257wjy.0.2016.04.05.06.32.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2016 06:32:27 -0700 (PDT) From: Sven Eckelmann X-Google-Original-From: Sven Eckelmann To: openwrt-devel@lists.openwrt.org Date: Tue, 5 Apr 2016 15:32:08 +0200 Message-Id: <1459863133-26810-1-git-send-email-sven@open-mesh.com> X-Mailer: git-send-email 2.8.0.rc3 Subject: [OpenWrt-Devel] [RFC v2 1/6] ar71xx: Save in ag71xx_platform_data if SoC is qca955x 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 if a device is QCA955x to enable some special workarounds for this SoC family. Similar information are already stored in ag71xx_platform_data and ag71xx_mdio_platform_data to adjust the behavior of the driver. 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 | 1 + 2 files changed, 2 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 b43c80a..09201c9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -1100,6 +1100,7 @@ void __init ath79_register_eth(unsigned int id) pdata->ddr_flush = ath79_ddr_no_flush; pdata->has_gbit = 1; pdata->is_ar724x = 1; + pdata->is_qca955x = 1; /* * Limit the maximum frame length to 4095 bytes. 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 d46dc4e..4db2c65 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 @@ -36,6 +36,7 @@ struct ag71xx_platform_data { u8 is_ar7240:1; u8 is_ar724x:1; u8 has_ar8216:1; + u8 is_qca955x:1; struct ag71xx_switch_platform_data *switch_data;