Message ID | 20181214164847.4851-5-frank-w@public-files.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54196924 for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 14 Dec 2018 16:50:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA5372890F for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 14 Dec 2018 16:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEA512D861; Fri, 14 Dec 2018 16:50:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 682C92890F for <patchwork-linux-mediatek@patchwork.kernel.org>; Fri, 14 Dec 2018 16:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pJuD5ZTwLLPy2O1GoMlQmOfKphGf8wJD7VRYJ4+iIPA=; b=HlbGcRv4x9Gkl76mwcPYt4bViz qp/icd0fCvVKia180qAj/8CKWzPjUj01u9uDwZwPB/KDgMbVhXrv5jcVNixFbualmJVtTgLA64vRY LLrmeDO9KAr8oQqQr7QsQdZeidmxPrZuAwmUX2i7zZWicb4AshdJ9DTjjnEbVxdp56wsplAPuNp9P ik8/Jg44K4WCLrTIox8hTW77M+1Y2OcJc4iZpNOkkoH5zSmU4pidB+9yhmjQgwn+oAwPm/3cs5m26 xBV4cC4mpX+EvSAyAgE6f8ZRswIaDrHKV0tjFrfl7TcBgnmqqOPl5QX8aXfHheil3Vw6bBS1BQONG U6zhRiKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXqfZ-0000wf-8h; Fri, 14 Dec 2018 16:50:33 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gXqfN-0008Lf-2U for linux-mediatek@lists.infradead.org; Fri, 14 Dec 2018 16:50:25 +0000 Received: from localhost.localdomain ([91.14.94.237]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MQ2zr-1gSbSU1h1n-005GO0; Fri, 14 Dec 2018 17:49:13 +0100 From: Frank Wunderlich <frank-w@public-files.de> To: Matthias Brugger <matthias.bgg@gmail.com>, netdev@vger.kernel.org, Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>, linux-mediatek@lists.infradead.org Subject: [PATCH 4/8] net: dsa: add support for GMAC2 wired to ext Date: Fri, 14 Dec 2018 17:48:43 +0100 Message-Id: <20181214164847.4851-5-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181214164847.4851-1-frank-w@public-files.de> References: <20181214164847.4851-1-frank-w@public-files.de> X-Provags-ID: V03:K1:Y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Of/M9KXUVMcHidJcw9k6UyWt D3zdYPnFXx2cq9x5+h9JUtOygl59ajQutUXfiQlCxKbXl2ecZu7kOE1soV5xGEHsoC6skt/f8 RQaxmZ0ufmN9Hz6GDt2ANKJ7cNZlJUuvtFvRCYHxuZk5r1xgV7ifpXzXs3fIeK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181214_085021_597800_57E6B540 X-CRM114-Status: UNSURE ( 6.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-mediatek.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mediatek/> List-Post: <mailto:linux-mediatek@lists.infradead.org> List-Help: <mailto:linux-mediatek-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mediatek>, <mailto:linux-mediatek-request@lists.infradead.org?subject=subscribe> Cc: Frank Wunderlich <frank-w@public-files.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" <linux-mediatek-bounces@lists.infradead.org> Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
adding multiple CPU-Ports
|
expand
|
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index a5de9bffe5be..a6a15a063e3e 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1277,6 +1277,11 @@ mt7530_setup(struct dsa_switch *ds) val = mt7530_read(priv, MT7530_MHWTRAP); val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS; val |= MHWTRAP_MANUAL; + if (!dsa_is_cpu_port(ds, 5)) { + val |= MHWTRAP_P5_DIS; + val |= MHWTRAP_P5_MAC_SEL; + val |= MHWTRAP_P5_RGMII_MODE; + } mt7530_write(priv, MT7530_MHWTRAP, val); /* Enable and reset MIB counters */
cpu-ports of mt7530 need some special flags to be set based on https://github.com/openwrt/openwrt/blob/master/target/linux/mediatek/patches-4.14/0032-net-dsa-mediatek-add-support-for-GMAC2-wired-to-ext-.patch Signed-off-by: Frank Wunderlich <frank-w@public-files.de> --- drivers/net/dsa/mt7530.c | 5 +++++ 1 file changed, 5 insertions(+)