From patchwork Sat Nov 9 19:00:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236117 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D98551390 for ; Sat, 9 Nov 2019 19:04:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7C39215EA for ; Sat, 9 Nov 2019 19:04:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lzK8RdL3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="CJyM3eoJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="euMdlycN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7C39215EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=p1Bw5fBSo1u5tgMeQGM+ez7rxLLgsjZlvi0fihHEXNY=; b=lzK8RdL3cqKRNgVvCRLddWgWip wgCThhztWbaio2D7wlivl9uPkX+VP3bUVy3MoUVm/TTBwzp0M9HqVjsciGX/C3+P4iQ1/tnT6Z+NK kKRPeR3aENbwl9/xIhpCOcbueKsWeUij70WgKp/ADD9EBDUO8qS8TpUzQDvg33R4XgClvmBoCKsxA 1bPN26b1bJHvX8Z3GSjgI8a5s+RR62fAReIRWaLGds8Gr1k9Mi5J7PQXGkogmQ0MxglIlxrSDxQzJ dFE/IdcrWZQU95sktPhEeOZnO6pFomeZoV3NVggBQIelj9Tb50LMRWlwz6XUBeB96rLnS2XNjt30t cu0wdONg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW1m-00008M-7J; Sat, 09 Nov 2019 19:04:06 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzy-0006sL-Q6 for linux-arm-kernel@bombadil.infradead.org; Sat, 09 Nov 2019 19:02:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=035iLKs5v8TwDHK3TFqow2oh/dIR3AuZdoJNKkgNJ/4=; b=CJyM3eoJdyqQooLBxaIzzX72j9 ZcDyEpMNhh8E+GlsDZxFriig6m8w6YpLVVhz3ilxRm4duJ6CUdC2VZ1NSWSM1iS2V3LulNi9N+Fnw 0WTJlvfiXib/uhQnrppz0p4DU7n1pL/22ngKZ1nJvBoUC2TSqMi6WCRB96ViREA8+4LhAcuhd7oBd mg+f2+LyaVVc67ctRsLFo8t+fwl0YxF440dIRuruM5YrCvrNaDbT7z612qb731DGhOrOj6MiP6Xdo gGRmN+qSqhaJdz9MLQRXrmINeSNOxQD7ol1bSTIxSWe7KNvBV11N0MfTXnySgmiqdVEV16mvCk9Ox czldq68g==; Received: from mout.gmx.net ([212.227.15.19]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzw-0000mO-BP for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326036; bh=S/R9p3LmiPOl5VPxL/0bK9gmYYJNvarGPi4G/WRv2Fs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=euMdlycNSdccdoR6BP41fiv1qFnEVYpM/cLAcRJ0svhxPXEk5hUowUq1C6TehqLBF 3B5VVdznfIwaQXIu7Ntj2uDzru3aPudX3uxsqdx58Z4LhMb7IEaeY9TBV4IpeH5gxm wWWMeaw0vQKIAliaw8u0dl9QEVdgFluy91/XJZcM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYvcA-1iPEdY25Ue-00UqCt; Sat, 09 Nov 2019 20:00:36 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 1/7] net: bcmgenet: Avoid touching non-existent interrupt Date: Sat, 9 Nov 2019 20:00:03 +0100 Message-Id: <1573326009-2275-2-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:RfJf8GCWw43wRxr3ZjXLWaFnAobGeS7MvOIMsPqJcymWF5y56Ct GkM+/XB+uoC1UnNZQYNKleRyXQCUl+yYDr4B4CmJbCAh2AHwj8JTZkdMS1uHjS24ILo3nIi HrM1Sjlj6eKfSFlEHlPEP/q/h5uBpL7iSdtmK+tziZKpn+4KPW1s3e4t+Ng/fZ5/K9Pf2gs 9wsc9TPtgJWElyJIJffiQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3BhtR1v8Axo=:WuUOqDDc0bc4mYAB3R6Ncl haS3Z87RgtQZPdmrhPeMkuwbE6EH297UqE5r9JQt98B5Dem4M/kXdevqpCNzyVfu6ftv0ONsB QpZ1f0iMVuui05bG2JShy7h89fvoIQuUMG5HNMXw98Aq9Madh9CFPa7d1ew2KBB3Pg7tlVOCb mQFSvqspHwySjGf4JJQX7UrwAQiy6Ui6dXYiYAZuPWvx1NA1oqlH2ahcND8xsgX7T67JC3cQL mUcxyeJWz1Fg/n2Him8C4jTkpSnkDyip+71GSY4pGgcpUBAmCspmrlxeTNHh6C80MBMK8H548 20iigaF8wnEg3QK4rfLdysYR8JVeDB0qjuEMKiFPrS58n5YotYQXrtYgz5CmTxZHiHNmVxVJF /gWRbc+7xuT0FL2x29UiwJSXHn5XQ+FTmUYgIr7sxwhSKBguzzfdR3O+MSr9calEjrDdAd0+M 5pee/n1oN50qNzLXqJH8ovJcjoeb0eLWIvdGZK4mwv2batXbqIRsFOaMje0bNVdKc5dz64FBX kHZa50mIWNHhXpAOVvv3mG0GKKuqWVZnkwy50Vjn1oxPdmSV5vvi8jSdOkKCsQqqR9kuAagiW V4aGrACt7POFmqvf2asLGIgvh1X5eFDZS3mm78U0zbO3CRwyQ2lb+PRgjb0KI9nL/MycSMcyL VKv6jcWqS5H61KSqU4dphyvisifIOaUOP7aczrWz3LlAU3Eel7QKSBF/Bg1ZJtNJPpvcEUL09 hBkCP5/wL8QlRF38XwJp89UOLvt1UIycHskmtdu36Rqe3J3R4lHny8EdlRbfvJDu9pc57D5Io 0Nazzft0wTTe+AWYK8in4cmPjBD2V7UQwuA5eoHUpKTPf5yBt+4FQMX+IMrEEOqPbzG4bTTkc TTcQ3r104ocoO+dchHviR5O9d8UAcJWOyZkQ5GcjFKaj3ACElwG8bdbgvJ4Z8z9gJNFwfveMl ZRx5gT/rLdKN6jj+beHss1LuD+aYjNoklxxvfeTM4EPVESsj2kMJEnCkuHqEPTrsOnZHwXmUJ hVU2NqR9+lgDwtO21fbUsLhNzdrWSxaETki+4AF0gx5iavSXinBZiv70rv3t9zs1vQFlyIN6p 61M3FCK8dwcoKLXSR6bt1BUT3hxlmnR6YcbrXTTfnCu9RuhoqxDWy1wQBPWYL9MHJ8Tvq9H2P K/ThOCvoRbBmXBAsEuD8GLmbRkxR+xQT9YtZ5W31cvoULQOwyedLqUukJoxNCKu2FUovy2yFk WkCYWgVMypqteZXh+LqcIIiUt65cNV21hyZBNTQ== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.19 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org As platform_get_irq() now prints an error when the interrupt does not exist, we are getting a confusing error message in case the optional WOL IRQ is not defined: bcmgenet fd58000.ethernet: IRQ index 2 not found Fix this by using the platform_get_irq_optional(). Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 4f689fb..9f68ee1 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3465,7 +3465,7 @@ static int bcmgenet_probe(struct platform_device *pdev) priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); priv->irq1 = platform_get_irq(pdev, 1); - priv->wol_irq = platform_get_irq(pdev, 2); + priv->wol_irq = platform_get_irq_optional(pdev, 2); if (!priv->irq0 || !priv->irq1) { dev_err(&pdev->dev, "can't find IRQs\n"); err = -EINVAL; From patchwork Sat Nov 9 19:00:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236113 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80A4F16B1 for ; Sat, 9 Nov 2019 19:03:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E286215EA for ; Sat, 9 Nov 2019 19:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WZunsg3Q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PMmFLHSZ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="IWA2bLKh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E286215EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=4erlaRX2HVnCgE+dxjYtWAqxz8pLHc2JvrYKCl0er5s=; b=WZunsg3Qu4ALr4UKpKFB37bgaX RTBDnLaWk0wHZzW7H4hB3xN7EKQ/JP6EGtIgjwr6wafchRvk3o1Tz23VY5JNzWuhoixEukaF835Wm QKOUj1n7XEpwnDDgq1Tx/OCso0Sq3NW8ejE5/A6UwW93QMOpiZ6EOfc8GLeZ41jxqdgOFYopgnpsv URwgzIOS46+4qZ8nHnHDvARCPpvOUcK9bzwXsITwwHWpReFh+fTZjcKS1LPkLGdZhwxjM8d2lxtT6 LM5/GLkuLmhdfZD7YbmrwailxObCcvaf6CWVeBnwhlqxScoOEPhp+r6KHdHyj4dlrlNlf3c2/C6/g X02JXVvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW1C-000825-DW; Sat, 09 Nov 2019 19:03:30 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzu-0006og-9r for linux-arm-kernel@bombadil.infradead.org; Sat, 09 Nov 2019 19:02:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AZhlPhSkErr9pCtF9gdGy/0UFjSkGO7v3pfbwuK45UM=; b=PMmFLHSZSWSzHhyvL2+xysJUNg ZRJYsJWJP/yUQX0Og3lhX9J+NTjmuo0F5E2bjKZvgG1x/0FYTU9u1kog7AmGysRA/LKVJeJ2LjayA lH4gf6+NUGs3wxs92seY33LFl7vsn9ADoFX1JKaxBNLfNKxDzugbIlMfDxHzOo8wVY0LYttVN36hy hDkJBWw1rnsbUFzlzPLykKiVBegtmNnyJ0Vq08hCUTGupPP6eUOwgzNzK3e2ic1qEIBnba+VQuCbS E0A3xn9ed842enV8SfqTPoFuCJoeUJDO+H2aSWmSrGak57HNqt0HQ71Qgs4fytQiYNEJNjuW1dAjn vOg9UTew==; Received: from mout.gmx.net ([212.227.15.19]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzr-0000m6-0I for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326037; bh=rNLogK9BckiGL3DWCHYqrkutclGgvI/HzJvgD8WpP8I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IWA2bLKhQDSqj1tzimAlavx1IhV9w3NxwDDwiSBSbtrjkQg5C6bZMRmJRdrmyI+UD BMpptQq0aiMHEidBK9SwT4LPt/1HJPvjA4dT8QdBJLghGwuopX1QAtaw4Mz3tIwViT cDEV1ZNDedxcqnN2jEKQ5J5l9NIDm4o7TDcM7Ijc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGyxN-1ifwZi0JG7-00E8fU; Sat, 09 Nov 2019 20:00:37 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 2/7] net: bcmgenet: Fix error handling on IRQ retrieval Date: Sat, 9 Nov 2019 20:00:04 +0100 Message-Id: <1573326009-2275-3-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:4hzkVM4QKJ8d4ZSUQvqpOkMCKuVe0WVjgAfvovY0aLWWzOpe3Pn fzp6WmC1IYxCx+Z+LTdVn1vtn4kWxHZa8u8hf0oB0Dc+i4zbo61MOINMQKskxtSX33fmrku d59mDpxW0IWMf3YLVIUsCBi3zbGY4ELWT28j5YPoeg7OExmzkA9p5EBuLPe387fPwZQ+/P5 gJ9Vfv6ZP7573QJFVBI+Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ZxUtQu/2WJE=:aIe2ycJ19P2zrRHvWpOtoj 4CKNc7ixVJbc3LW3zOyEJEXU5te+4hhGDb30yMu3q33I+jntOKMfzOa1ECLiQAavcpGP6vJF2 2uO/BWvRHteqIP7wC2xWBozWN5K+yAhIISdLnjokGXtCwKRI9LaEMRbjmyzBkyCNxpLvJXoqd fL+YsrWk0IeHcEQzD92d+fpqnkADCK9zFo9kDTY7Ab770++gvobN/RV77u00O6QuvmQeJydDR 5TeI4wYPteq74mg3s6YJOJzdfsglogvJiUaHQswS1aLFG30jdthOWxU3wIpKuyEYm0mv2sfoM 2bPRK2cQS/Zn1VDf1iluCIuoVuR/YWhhjwJqYT+hHNtFRKPUq62ZdUGCJc6/NgeU1L/A9qit5 0bQN8Jh8m78pV05hbRYaopMqnw0OInhSHS0TUPLS+Nw6Z31a0oYEBLD4l02TELD4Lb+Ab8/rv YRfcWzRRDuQ3lXz+/ry+9lusmdgF/i9OmPKOhcRvfTl9vcobSffqRBdi/MxmUYtqNRM8qOTOi vylOLKevEkzqPLie0nZ0xwEyR/HmhwRxnx9V5wtew+dUMbQNuHFpJXEgNonjnTikalPfzStB3 dbogMhaIPbj8l9mDzqMEdZ7gvYlOlXWcT2QSYMQTZsBkkaUkscszuWwxkeymxddGBGcykW7Pl 1FnloRD2IuzbTV3Z5r77kSbjNALvKcK+W4iWIOzByzjRLRgzFEU9LMYLajvv8ntKeVBMBjFD5 W7+9TIpchnrau4dTaPFhLpolmiL4XKVvjUB5pu76F+GgYW6hPe7gN5fe/eULEVGOqDx82/17V xbes/3K4ot8gwjAjnBFJmWcJ7Nb7bhuPZw/DCd/WF3ythQmQUgMeLF+r/iUX+pYuo1u10iXqQ BzoAF/4HPhytGKJXJdr4KLZGsFGTP5XbvJ0VWbaUC/VCOYRRIXRaKh8toDNmyxVIocl1krqIe BjUhMm8SQi5kVTyOw1fHrhVWRAvk/MfRhwjHb2Ow+n44gPfxt+4aDQMf48aulzxQwa7fHUQ3Z D7OrpeNrKiUQIKMm07U5a38461r3xKUhgzYZpSkdzFUfP5SR9v7zrfBAE+qErj6pKarbLAcj6 dQB7eq1gwEGaJgBy6IY8Vcy1GPLQRNMxpmAClsiG/MWypaBTOxz9tyrOAa8ByWEXooH4gbWiU PgBUfy7Hde0GxJZKyx2197c5juIPgKdvvy8LIU079BAxkl+t4m81WAtBMJCILffl+OCj0/Hr5 OcnBrBRpQ9urF8i+C7i5/0AURtpdtqD8pWMko6w== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.19 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This fixes the error handling for the mandatory IRQs. There is no need for the error message anymore, this is now handled by platform_get_irq. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 9f68ee1..1858ff7 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3464,13 +3464,16 @@ static int bcmgenet_probe(struct platform_device *pdev) priv = netdev_priv(dev); priv->irq0 = platform_get_irq(pdev, 0); + if (priv->irq0 < 0) { + err = priv->irq0; + goto err; + } priv->irq1 = platform_get_irq(pdev, 1); - priv->wol_irq = platform_get_irq_optional(pdev, 2); - if (!priv->irq0 || !priv->irq1) { - dev_err(&pdev->dev, "can't find IRQs\n"); - err = -EINVAL; + if (priv->irq1 < 0) { + err = priv->irq1; goto err; } + priv->wol_irq = platform_get_irq_optional(pdev, 2); if (dn) macaddr = of_get_mac_address(dn); From patchwork Sat Nov 9 19:00:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA4FC14E5 for ; Sat, 9 Nov 2019 19:02:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EEA021D7B for ; Sat, 9 Nov 2019 19:02:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SDb6IvuQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="DzQZLIz1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EEA021D7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=GLzX2EEplUTSJzUzNLlrRtNDTOOThQ+AoSg3w5svO/Y=; b=SDb6IvuQJ93ENCFpdwEwt3wh/Z htvtYwOF3nb0AoLNxeOW2dWzsnh3nxYKSJcr4SZVzNtOLSicWrs7P8ZeTnuDxHcn1RzW4kRrlKsDM QnZ/ZsFZn3Pe0ZNwDYvhiQt+YL8zQvr6+L49drNFKrTBcELHxWA11xAw8iC8WYO4WqyzUxb1XqVqF Vo6Y9uoMe1Q783xgMoR/v90eERrRyjKeQzEe3e/h5/8BlEU2Reg/s7WpFePB2G1504TmdmdALfNTX mPyHVGpUM0EQqIBoTpIuQ92/eU+Woc9FE0BorEbwrHndUfz+puK4Dt13y0CQaH6CkTgRZFR5abGvB 8qV+2qQA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW0T-0007I8-T1; Sat, 09 Nov 2019 19:02:45 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzr-0006n5-8T for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326040; bh=JVZl8W/9+KNx/j1P/L1YRs6FPMBmOMu1UabPhPEYHhk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=DzQZLIz11T7B0jcpKMacTWNzT9xT9IJVM7VzKQz80cPYIi5oj0v/xhbcTADaPNBku eTntYI1c0nTMjAyVEKCx/iatQK0GsBh3Ne53zLMyf7RupV8rAEsv0goL+Lwd1FQYDo UK6sHj1gdc2RwVnsRY/2iGrdZkmC55Qi/e5auU6w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MaJ3n-1iNrBy3naH-00WDmc; Sat, 09 Nov 2019 20:00:40 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 3/7] dt-bindings: net: bcmgenet: Add BCM2711 support Date: Sat, 9 Nov 2019 20:00:05 +0100 Message-Id: <1573326009-2275-4-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:pwOME3b6oWQDA7hj+VvM3FemGnxDGMVtUsrmvUWBojPjbsUJj5g 300M716nvIH+/zzW6V95lzzIdameXkzy+65nxaA75HdvSqLrcJ2yZnwSz7FA1wfFpen+iQH tky3K6sTWcon0UzYKedln4kAsK8ye8zgkz9Hqpg4yb3xyM3Fk/zpM+a4O2QFOnMprCq0r1V BQN3WJ3jsfL9CLL4aRf0w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:KGhR4dW8DD4=:Ia2jekfGARc0JTClwjuthO Ggbca56CYDzUGE4+duwBPhXaaHf1RBeXFkdLcC3OaenVxeQ8lxnJgKLkZb1wmzpHZtNhXJgns jAUtGBK1aFiyazU3OPEAWh/zpQcI3kavjFedgFdmP4E3bhFF7aY5GemASALMGiNEC0ro67nzn OZSgGl7b0nAxzgwdZAody3dipOLABhxh9Vt5EH4PAnHh/riFe6ywP3Ezp2MOFlJ+zihhTiw5M h9q32ulShIW8c/dMTLZNog1pAZvGDFyieYjOiNajKCjnktVEnPk+Sguaelc6qD3+8bi+RImYL LpDHCRZUslUbawDEEXVuzpZxMwF2QhLhG0A74fkyGvsSk3Zw098XalWDPKh6Ce5kXmvtwN5PS bIKGepNUzZhMWdvSXHNVvWvSK/xbSUY4PnzNsgmBx6Mw1lOpxYvU7EUsLRDd8pwHthuG1ZDVA HzmeY1NIjsOGhsON9/ZmiJkhEDeh2VwWg5mqbQ7KGm4VpgTJUvgA+Z6cqSkf3VfyrDbcyhG1c ig65fhzxN/sQXtT2Ykl/z2jclURcPWEnEQvfchloqVpbPpan3vk0YlExdDk7xbLpxY7cIMc/4 XnqS5+1M5njW5tNVy1rqFD8H09aGuzgjbDzykBsSHE6pN/jsSscn8ZAgqBx/jiIK3OaxMz0aO Ea3+t6NJA6VIJoLJjp2tz8uOOKKG3uERMrH5T/q1BRjNk1Kyb8Y+90AwRFUO5WG0yxqoW57a+ GpYkZTldT/7noge/ElaTZp6KhBzHAc9YvLOo9yCoNuLCNYf0++otADT5fTSVM5StNF6gUFkga lwbsWcy5SCD4HFOK1OxxxRZ/pNHvxwa38razR/LW5Vu0zL8DpnNKRaUmjzLI8IQsP8b8UlIzQ gO5qcl7OZkjczFnZoxy4jQOrKxYbldepKHE74KK1bTBOR//si0ZEwj04h6GJbpMHpbR6q5JQe c33egWAWEKg08DvrzOd8fzPU3XQq52uPtmkzGzFe76+bbfeqPZ3jpBZzE0tngumXQ4pgMANkB IZ5Gw9k+IpY2UzE+LBwbxUM8WmI6/QvnihmhE6YRX1yyFGCT5k1tj8madseyz9FUTqkt1rxqz LLy3R5P/UMN1dlHfQVDbIPp/8YLODD91babv8SPolH5oZvM/KmjU2WgJn+YF3z+sbCdyh8DJV SKDGvx0e6vyeK01WtQbjcV7PIMaBtnvbftgzRhRMNIJZApR4tbqbBqMVxm8/Pm5QzXsUh7RiZ bCuM8wEp0xQXviYILNDj/NljX20pU72FLq8NOPg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191109_110207_588872_309A08C9 X-CRM114-Status: GOOD ( 11.38 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The BCM2711 has some modifications to the GENET v5. So add this SoC specific compatible. Suggested-by: Florian Fainelli Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/brcm,bcmgenet.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt index 3956af1..33a0d67 100644 --- a/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt +++ b/Documentation/devicetree/bindings/net/brcm,bcmgenet.txt @@ -2,7 +2,7 @@ Required properties: - compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2", - "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5". + "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5". - reg: address and length of the register set for the device - interrupts and/or interrupts-extended: must be two cells, the first cell is the general purpose interrupt line, while the second cell is the From patchwork Sat Nov 9 19:00:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236111 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 035FC139A for ; Sat, 9 Nov 2019 19:03:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D48F5222C4 for ; Sat, 9 Nov 2019 19:03:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YBQQkTJJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="btfHsJhR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D48F5222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=C7e9/bU8iMeqOz0fYUgfGghUOg9o2PPU/Olc787Dufw=; b=YBQQkTJJjT0+tq8DF9gSM2B9EV hVz9AD9rGOkeqAVhI8A28n5GFzk7u0hhO5Hsq7or5vbMxYQF84S9fcxmNeHryPZ6kyaG44HbqtIPr u//Y5McjPQYtajo9X88T03xd4rBMwjKell04HLzPjGs10oJL+fdzbfEkK17/26/AnHOTyXHUvUfCR ywlUwvDCUkvkqX/Z2M83NlO6wc9qBf73WZZhKJccUkSZ5W1x/TSZi6Bvc4wlNOrfqidTRKZGgU8B+ N5l3NFg2hedXsQV455an9DqOj1WYaPASBIIZkaW7ebSvYJOG/7g1XaOG8fsHayOfSlvceVBgT+lHf XJDDV+tA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW0z-0007ng-KF; Sat, 09 Nov 2019 19:03:17 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzs-0006nI-E5 for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326040; bh=fMsDx4Q7m0P/lGYcrZ+P6g0Val7iZWLeetZv9tUVPCw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=btfHsJhRcLJC3/5QauRgJ5aNgnA/3KxUWcReyvrUPIPsjwYlaCa7FZHeh5H0tsqwc HIaxIpVnmre2bFSrSxaIX/aLUHdG4bm0L3swcfuH9+lqGoydd/RAbhIp+Mcq9YviZS LF5yF0mICIfZ6He+HjMhWpRCmTbsBJDsd3bWsZZ8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mf0BM-1i0VwQ1YCo-00gYSL; Sat, 09 Nov 2019 20:00:40 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 4/7] net: bcmgenet: Add BCM2711 support Date: Sat, 9 Nov 2019 20:00:06 +0100 Message-Id: <1573326009-2275-5-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:uxBWz1h+YHqbqwSUv95nIGsdOePNI2eVoIDuBkpRwjNj/LueWJ4 f2hhozCOcsANtwZcNH8vLXBwglMMjl0/gU3VeZxRzJmEDY6qwlwvEb0dIl/C9Iv8r6zryVh nsblxp7Q7V3qsBJTG4mtKcQqTeKJ+4PEAsd8yjMIhL3pR17MWo0qEGGt1h7E1oxghbrIX81 qRd+BmVd2Zy8DuQkbO7sw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:kFxglpwUdGI=:C+EQxezmzTNUNB4m8ek2n7 61L1qEdXVsQtOR0hs2AxK/zLElwdeTHMP2J7t+aTQmkRjTe/oqBBMQTtRj/teLZgPgtKaHVl0 MmxpdGlikBRYEIP347UVpwzDh7b3tXWLju0Y4AVkmm7wd9KHp1OWHu7V4d/NePVz0zs34Glf0 Lh4oPPGNrYjoR3q/55Cq3J6e5rwX+niuq4EaoTWAw9hPuoXrCW0sbHPfpRzXH9hJhh3P2koTI fOx9KyeeeWJFaHcSi01fg3AhRBkeW64WVe3QJNnju4Mh0mIhdeBbA+q0RyBWn6GHXz45veleU XF+zaiKTzXvboxKFB2P11xSZUvZXOH4f0slM8tPM4Y02/7TW1ZQXWKvdYgV+aKOR/h205LIH7 zXXJhoainwzd+gDuoTbOvGVbWUYAfO/8QlSiEBma05E9qaBtYG0tGS8NB61e15R5Z6/ImDA8B yD6tqcPC0qbs7oi7QDkSdQOSYFu4Y7a/9EQxtLcft5ez5/u1JR6QROQ/fY0oQyWaEF1OtEfOL /nsosS/CfnkBMfXEmVOsHEnO48peY+2FOoKGBDpZAsKZaG/5ox38Wn7OqVn1vcPt1V9aposcS WDZOjnLt0jtoBqTH1BQkNYKSfMTMM8n+rj5YCQstSamiMqEqNX25+ssr9RcaWCzjYYlr23M9H p7KQPabvwaM987dQBHiKsflSb006Scl5YH1B5dN3/9KTn8FE3yxoUJNOUz5Lq1o13ia4CRMIh 2l8kcCerrod6JvxEMV2GsZz4/BoaDvxCsJrGA2E/chMRnvSYbCgvcCC6KTLjIoUB/PE20rq11 +gikhtUU2B01SPf4KHCH/8ZQukbCaE/zvyX+iXUEmZSO1Lcfb4ThrGa3zjK8WpfziqLLrQdmx u4thUNsfSICHerEyIIHIFWMK2uAGItuqLJQquJsOTQbAZNdl1kRpO+l9OA1GlC8qa55ghWrSV jqlbBoetcCCxJw3LCPG72OcbZk2Rdc2G/sAeyjHXBXLY8Cnn7/Ky7hc8HH69u1DRgGizVFpN5 F/5dvbPXkwb/3TIpRo6/RzNEHQXen8oQBPxW9a8SKDIx++hwyQPsXYuUCATBt9lM8JxzsBjOF +/hkAKlcxCm6MYDtzKy6Jh/jPg+FijKMvl0NZmVKsoea/02vppEOFhiJh/tLqcekFBBwprucv xEfI3sgAvpIcI5t8jq7rBM7g7+smA0Hlr0ipCz/5BemgtjYtjabQCYcBzg1AsqBML9UNWeEOI x6nmEM81JhmeFlOEjHkevBmS90G2u8M0cFEf37w== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191109_110208_803086_AB1F0BDD X-CRM114-Status: GOOD ( 14.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.19 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The BCM2711 needs a different maximum DMA burst length. If not set accordingly a timeout in the transmit queue happens and no package can be sent. So use the new compatible to derive this value. Until now the GENET HW version was used as the platform identifier. This doesn't work with SoC-specific modifications, so introduce a proper platform data structure. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 63 ++++++++++++++++++++++---- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 + 2 files changed, 54 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 1858ff7..7c0c5d1 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -2578,7 +2578,8 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv) } /* Init rDma */ - bcmgenet_rdma_writel(priv, DMA_MAX_BURST_LENGTH, DMA_SCB_BURST_SIZE); + bcmgenet_rdma_writel(priv, priv->dma_max_burst_length, + DMA_SCB_BURST_SIZE); /* Initialize Rx queues */ ret = bcmgenet_init_rx_queues(priv->dev); @@ -2591,7 +2592,8 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv) } /* Init tDma */ - bcmgenet_tdma_writel(priv, DMA_MAX_BURST_LENGTH, DMA_SCB_BURST_SIZE); + bcmgenet_tdma_writel(priv, priv->dma_max_burst_length, + DMA_SCB_BURST_SIZE); /* Initialize Tx queues */ bcmgenet_init_tx_queues(priv->dev); @@ -3426,12 +3428,48 @@ static void bcmgenet_set_hw_params(struct bcmgenet_priv *priv) params->words_per_bd); } +struct bcmgenet_plat_data { + enum bcmgenet_version version; + u32 dma_max_burst_length; +}; + +static const struct bcmgenet_plat_data v1_plat_data = { + .version = GENET_V1, + .dma_max_burst_length = DMA_MAX_BURST_LENGTH, +}; + +static const struct bcmgenet_plat_data v2_plat_data = { + .version = GENET_V2, + .dma_max_burst_length = DMA_MAX_BURST_LENGTH, +}; + +static const struct bcmgenet_plat_data v3_plat_data = { + .version = GENET_V3, + .dma_max_burst_length = DMA_MAX_BURST_LENGTH, +}; + +static const struct bcmgenet_plat_data v4_plat_data = { + .version = GENET_V4, + .dma_max_burst_length = DMA_MAX_BURST_LENGTH, +}; + +static const struct bcmgenet_plat_data v5_plat_data = { + .version = GENET_V5, + .dma_max_burst_length = DMA_MAX_BURST_LENGTH, +}; + +static const struct bcmgenet_plat_data bcm2711_plat_data = { + .version = GENET_V5, + .dma_max_burst_length = 0x08, +}; + static const struct of_device_id bcmgenet_match[] = { - { .compatible = "brcm,genet-v1", .data = (void *)GENET_V1 }, - { .compatible = "brcm,genet-v2", .data = (void *)GENET_V2 }, - { .compatible = "brcm,genet-v3", .data = (void *)GENET_V3 }, - { .compatible = "brcm,genet-v4", .data = (void *)GENET_V4 }, - { .compatible = "brcm,genet-v5", .data = (void *)GENET_V5 }, + { .compatible = "brcm,genet-v1", .data = &v1_plat_data }, + { .compatible = "brcm,genet-v2", .data = &v2_plat_data }, + { .compatible = "brcm,genet-v3", .data = &v3_plat_data }, + { .compatible = "brcm,genet-v4", .data = &v4_plat_data }, + { .compatible = "brcm,genet-v5", .data = &v5_plat_data }, + { .compatible = "brcm,bcm2711-genet-v5", .data = &bcm2711_plat_data }, { }, }; MODULE_DEVICE_TABLE(of, bcmgenet_match); @@ -3441,6 +3479,7 @@ static int bcmgenet_probe(struct platform_device *pdev) struct bcmgenet_platform_data *pd = pdev->dev.platform_data; struct device_node *dn = pdev->dev.of_node; const struct of_device_id *of_id = NULL; + const struct bcmgenet_plat_data *pdata; struct bcmgenet_priv *priv; struct net_device *dev; const void *macaddr; @@ -3522,10 +3561,14 @@ static int bcmgenet_probe(struct platform_device *pdev) priv->dev = dev; priv->pdev = pdev; - if (of_id) - priv->version = (enum bcmgenet_version)of_id->data; - else + if (of_id) { + pdata = of_id->data; + priv->version = pdata->version; + priv->dma_max_burst_length = pdata->dma_max_burst_length; + } else { priv->version = pd->genet_version; + priv->dma_max_burst_length = DMA_MAX_BURST_LENGTH; + } priv->clk = devm_clk_get(&priv->pdev->dev, "enet"); if (IS_ERR(priv->clk)) { diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h index 7fbf573..1b65b73 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h @@ -664,6 +664,7 @@ struct bcmgenet_priv { bool crc_fwd_en; unsigned int dma_rx_chk_bit; + u32 dma_max_burst_length; u32 msg_enable; From patchwork Sat Nov 9 19:00:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236105 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 184C314E5 for ; Sat, 9 Nov 2019 19:02:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D380F222C4 for ; Sat, 9 Nov 2019 19:02:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J937Szoc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="czluM3FT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D380F222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=2YWFfVe3jVQS+kA+OYyh/t9Pj75S7XqTviRSKcem/VM=; b=J937Szocrw3EMYgQP83dLbuAwl K239NnK01S2dGSp6zEGSFWW7z6lRT/QpQhKUe/0WKzl+P334dC5iM8Ybo11POfJdyc7NhIBrxfhdR yJN1U7uX4WXdsRVgjCnz8hOD0RXncaT9ZDb1xV0GQu5gsjBfjI/HFBqq7MGYwDBTvmYR5xBnJLyPn TDpZ+U7L/WZJPg/2AuGuMz6jXZY3mvZAno+GJruJENUnKTKtDuN0fusD/7PA/TGFv+BCi8k0ceB9R 4YSOArh83/AlbyuI1be9Z0mk9Jupl7UP3UduDYtA2CZUNrM6lhbuPQXKelJsUFtY5F3gT0IR0yHFE ODrb++PA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW03-0006xB-SD; Sat, 09 Nov 2019 19:02:19 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzp-0006mQ-GM for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326041; bh=4tHGKE+e17UnhyLVKq76j3dokNGsfO7qmeQ/3LMCwKE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=czluM3FTlc+BYMWlEGvkMYtPQlObKZbfsLLAT66Ns2weja1jDBTTSMRje37yDXJ6g 6Eij/IQ7IttjKhQqJCnMo8QZ4JyWSrHWRt9iKqKE4NrLoU2k3Bug2um8DXf5+pF9/6 xylg94t+76ksbTrCjCm4FBxm1tUYK89ZuJz6zhAg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYNNo-1iOgfq3maI-00VORB; Sat, 09 Nov 2019 20:00:41 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 5/7] net: bcmgenet: Refactor register access in bcmgenet_mii_config Date: Sat, 9 Nov 2019 20:00:07 +0100 Message-Id: <1573326009-2275-6-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:SDewv7JeUg4PC3g8+zwtSYku0IF54nARmVAnnYYd7o0rb0WqPMP qQSZ92NGiWz50ZwCoGeJlnQ0fAaXeLrNrl3XOjO3Otx1AJ+ZqHzN+/d8QxYCorv8lOeho2U +A4XI8RKiL3v5/FzynFNXokYYSf+l+6l9j6iE7Cl/dMkzxLxSPQcwX9M4RAzeEogSvbd6eo PsgVdy7yygDKREXdEjg/w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:z9p06GDHyOY=:+VQs+zygUqtK6j/EItEXvr wcTaKcGWhhIr9M7q98yrw4sCoV7+w4beQGUwNt1AALkGYLCUE8Ejzg4rUq5MSbd9LPwLKJEVg D9D08HhSq8LpduAoNYGQMN4pRGOu0/RQ8LLY71hHYf/mtdVxpaXRfBEcnCztCfIwSwpZ3txFa 81NFm9PBX0kbR0s8uWB61IxZW/ATJhT6VFPbcf4oYjSF7XzR5XV81Oj57B1osixiWCDoLYdg5 bK8pO0QLU958yCjEeT3kdeOILJJq8fDSgSOzgfRHQM3Fk8P7AoZY0NfwG3TkZAWsluj0UPBax eEyaIvQtk6xMRQYgRfUat4RwqsArvfwglRQBeCBJ9F75acEnfqgV8xMBdlV6rW2520HdH2NGG v3NA9RaQS78BeqwyiOS3mnpGkOwCfULkmzyeyPYWmRQ+Mr/u1X/Bc8CsVRKkklViMhQoy7k23 q3dtnG5RT1VA8h1PV/zL6dNLfhbshwWDQysa9M088oyDbvtJ5hL2zSGYTX0BaDfUNm20JLCMK okZsygOvXA+pzYfxExtvjOPvlD+fJH1Dk/ttXr0ZXYg5esYC5Ia5rknZpF2C9mO6rdnwTYQUZ BioNfK8K4H9eB3W9Dfm+i9lr2xNFblvU4LWH2BCcWa1LjYMsaT58R1OVn11Uub4jZ+2mz8/hR KbLT72PFv67tV4rC2n7USPpIIHn9vwQn0af4xzJMtxkV3jFesygs95BlU4ervsUsn5gZFjpaN WzlMgm17I1P+nSiYmPbNx8SEiw/5uvasWAqBcVa7fjRfpNYNYgqxGf9xL/TfPjUOTS4x5afmt 9XpLXdnKf7ImJg1H07XmaF15mBhnVjy084ml3P3+Z6N4nTkfdS0PpcVyS44sTkFqnUiFLmwlu peSm++mG1q7ejzYeIIUiodFuAPMtx0SJYzWem9FueCQvRBvrH30qe/mH4WMePC5FMR9/kPTrg XwdxbYfm6D1PlTNWsbj2VUAR3UZeyMuczA+3MgHvKsuhDETOcQ2wXekh3pBLkjerPufK/IGNx Ip29Q9MNTr4SQk5UfSRRnEUIoiikIRzIuM8xaYLk53u5ZUeIRrmEZMRxHwP0tXWLWCXu+qnDU 1Pjrr2Mv9UYWyI7oNKhN+uSz4HpmM/lm4fQGXuQGXR078pw5XqBDHOuSFDLolLqXFPFRbHZF6 tD7yooz0ePmhw2boun/9NnBDk6Q5FzjN3d7K8oOzPtWx6U+i0AbpPYALIclmTWuVdrJQd8yuV pQx+ewTNKprr6f23ZNZc63wNd3C3jFTy+fBSBrw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191109_110205_872568_B41BFC03 X-CRM114-Status: GOOD ( 12.17 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The register access in bcmgenet_mii_config() is a little bit opaque and not easy to extend. In preparation for the missing RGMII PHY modes move the real register access to the end of the function. This make the code easier to read and extend. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 41 ++++++++++++---------------- 1 file changed, 18 insertions(+), 23 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 17bb8d6..8f7b2c0 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -223,9 +223,6 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) u32 port_ctrl; u32 reg; - priv->ext_phy = !priv->internal_phy && - (priv->phy_interface != PHY_INTERFACE_MODE_MOCA); - switch (priv->phy_interface) { case PHY_INTERFACE_MODE_INTERNAL: case PHY_INTERFACE_MODE_MOCA: @@ -238,22 +235,12 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) port_ctrl = PORT_MODE_INT_GPHY; else port_ctrl = PORT_MODE_INT_EPHY; - - bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL); - - if (priv->internal_phy) { - phy_name = "internal PHY"; - } else if (priv->phy_interface == PHY_INTERFACE_MODE_MOCA) { - phy_name = "MoCA"; - bcmgenet_moca_phy_setup(priv); - } break; case PHY_INTERFACE_MODE_MII: phy_name = "external MII"; phy_set_max_speed(phydev, SPEED_100); - bcmgenet_sys_writel(priv, - PORT_MODE_EXT_EPHY, SYS_PORT_CTRL); + port_ctrl = PORT_MODE_EXT_EPHY; break; case PHY_INTERFACE_MODE_REVMII: @@ -268,31 +255,34 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) port_ctrl = PORT_MODE_EXT_RVMII_50; else port_ctrl = PORT_MODE_EXT_RVMII_25; - bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL); break; case PHY_INTERFACE_MODE_RGMII: /* RGMII_NO_ID: TXC transitions at the same time as TXD * (requires PCB or receiver-side delay) - * RGMII: Add 2ns delay on TXC (90 degree shift) * * ID is implicitly disabled for 100Mbps (RG)MII operation. */ + phy_name = "external RGMII (no delay)"; id_mode_dis = BIT(16); - /* fall through */ + port_ctrl = PORT_MODE_EXT_GPHY; + break; + case PHY_INTERFACE_MODE_RGMII_TXID: - if (id_mode_dis) - phy_name = "external RGMII (no delay)"; - else - phy_name = "external RGMII (TX delay)"; - bcmgenet_sys_writel(priv, - PORT_MODE_EXT_GPHY, SYS_PORT_CTRL); + /* RGMII_TXID: Add 2ns delay on TXC (90 degree shift) */ + phy_name = "external RGMII (TX delay)"; + port_ctrl = PORT_MODE_EXT_GPHY; break; default: dev_err(kdev, "unknown phy mode: %d\n", priv->phy_interface); return -EINVAL; } + bcmgenet_sys_writel(priv, port_ctrl, SYS_PORT_CTRL); + + priv->ext_phy = !priv->internal_phy && + (priv->phy_interface != PHY_INTERFACE_MODE_MOCA); + /* This is an external PHY (xMII), so we need to enable the RGMII * block for the interface to work */ @@ -304,6 +294,11 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) else reg |= RGMII_MODE_EN; bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL); + } else if (priv->internal_phy) { + phy_name = "internal PHY"; + } else if (priv->phy_interface == PHY_INTERFACE_MODE_MOCA) { + phy_name = "MoCA"; + bcmgenet_moca_phy_setup(priv); } if (init) { From patchwork Sat Nov 9 19:00:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236103 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4EFF139A for ; Sat, 9 Nov 2019 19:02:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3BA0222BE for ; Sat, 9 Nov 2019 19:02:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fwS6wHnW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="l1FJt/JV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3BA0222BE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=v6IWJ/UqdoSExPBBQt4rk7pt01QLTHSZkEMylcHNxGc=; b=fwS6wHnWONJMeCM7dZHLL0tNgm 3K0xHsq3ME2pe27BtX1/BWxz2oFUumbmub2gvt/bB64/JTXom0dLYgdOmawhJADhrvZ3z2JY7xWlj NNouAnkS75TJGtnKD19ZsakuveNcvRMhrCFKKhsmxuJ5bWXpBgA3e1NEla0bintpQlF6If6Cizn8l iU7VfE6mNEWB1xom2atJEJzHFywxReiGu6hqlbOka+7dzV9aftHgpqQ8KMU62Hb+VeZFnJP4YlRM9 C89s+8R+FmM7t4zJjltbfPMK6tgdp3o2OxkRfY9tyUvo3debwDsD2l4gnNRmJ4I7BCp96N4rFBWYN EALQWopA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzs-0006o0-Jx; Sat, 09 Nov 2019 19:02:08 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzp-0006mR-KM for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326041; bh=bF9IRVU1Z+oU5tnKjEXvJJa+O7P8tQaVbU3MEL17pDA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=l1FJt/JVrFQ4Cc3d64j1zLpF2x/BffVHtslCVFAZp7+a0ZmvFDWr9WPJuNoCS1baB gMRqbU7o9qZZlJ1DhUKQArkhlyVR/gW48DrxeU3omPQxoxq6SBWJtO8OUFkhOK6lok a8mYMTLjROCWDXQI/EhZpB6xBG9xTXsgrsEjwGY4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MHXBj-1igUXY1l21-00DaRC; Sat, 09 Nov 2019 20:00:41 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 6/7] net: bcmgenet: Add RGMII_RXID and RGMII_ID support Date: Sat, 9 Nov 2019 20:00:08 +0100 Message-Id: <1573326009-2275-7-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:19XFGzU2npmrhE8QyHNaT8vHf0VoFCxuBlYlyWoEyLrl7mZ23nD 1LFggpxZFlO39/Av6KGSxJ6cwbPl9dqfjsnA8Imx/J+ZjAnbiKNZHB6jOOeJy1ZyDcpFGwl cIZ17iEKCDsuYgG3If+xeUijiLiLh9iHeY0mqdWs61eJi8k8W1sa/CfIy7b/CSA0F1B6nIN HYWQ8WDYBPDn9FePEVZAg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:S8YkU2xmVYo=:UBd6+Er4cHJHAJM6IVJi3G F/XexFmtKjVA6wM+Rp3ZSNbZScoCrX4HbAFRMikvtMoapWQ2BSMCicUydV0K0eKcRa2/36iNV hximV/GxMQbaTK9SlbWFCzKXsrGsdh/lsR4RM0Pz1boX80N7VK5cmnjsz/iIL8vBAFIvyG/Ti if0MEuxfGHWaXDn/errOPjRWj9vQWkPGyotTTgh6fVjvkWRgR9Brp7exxm45FKgEg3ecZbJp/ RPHCyegUDnLaHaZ7FUiqHurOplS+tuM++l9BhSp9iA1nz/zlpydEUqQ+8kLS/q18VBepxdR3X 0aP1wcVORhsKGvoFZvyrUrOM1bf0HmmZjlHyScxODeAfC4fBAniUyzwzfEpdf1PqnuBdZOgLG 9sflnO/i46Pc29mwjvaSdbwCF1+vd+Gq+o/GH7uM84eDUltf0YL+IJyvXAzPVTQFWf7+hEe7S Hl0IYKtwuPZ9SgTj63gnW415To6VJvjcdpEVTTkKrzDjeaQqmmcRPCDDyggHzrZT5N/DV6dMG LIeP9VpXMJKE3D1jDZV/a4zUtzRcYpFgZLR46DfismFhGtGdXSemEmbr5DGXFrH3wOQIXf+t4 KxjlO22vG4jyFO1xIWiW/CbSxrFBL6xl9l3Bmz/qUaNhHjt5ebAUVtxoXdY1zK/g/PatRERQN K3fnT5YcWfh/seVjE+15ppheIqTIzAL/nDPSklwOfMSFpMseh2sLGXzppMDE21FFUtRJmj1s9 1kfabuNO1tJasx63nHwcsq7pXCCPZCh0RDudS45VWBgk8jhJOTvQMSWx1YfwAP4+zYmrRPN+R 7ZAaC50uwxNJhOP6ZKBqbYXVquZf+7VlRvjMy2aa9jHOwNRXsYqIvVjvIGoOPPIake62CqEjG 5q6J6k+SvJ/ocAuE+1vkErNhseHBuz7zlxijVgK7bWClK0DkeUZRwheU/vjc+APNht0PlEH72 n7wDI5E5okFqrDn7+8sf6iNhjypwpdrCVI3m6syAhRIKtGo67LV+ml3l2ap9ZEoN72AlfXpHQ sYetSlHVRmMSzP9+bpSILe1VUEVGAXZ5YaGATihulDEUwcotv3mwfFV8aW8fwXZkYqYHbBwTs 5PkyLpbPZV9ynfYwENZ548282CqhvbN3pzrdU3L5ocjl3cmMaznTkfM52WvUccV3NZQH9GPhe yfqGrWB3RnuW6UK7xkWaXOJ8QA1inUJPy2S0Ju5J4aVeHDfnbVIqfWteRFJz4tpI8eiFJgtFZ FFHW8gAz0UWcgaw9p5m0Pd94CROW/fY4Ecp0b4g== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191109_110205_960830_920EF228 X-CRM114-Status: GOOD ( 11.06 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This adds the missing support for the PHY modes RGMII_RXID and RGMII_ID. Based on the used register settings in the downstream tree the mode RGMII_RXID is necessary for the Raspberry Pi 4. Signed-off-by: Stefan Wahren Acked-by: Florian Fainelli --- drivers/net/ethernet/broadcom/genet/bcmmii.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 8f7b2c0..9091e5b 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -273,6 +273,16 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) phy_name = "external RGMII (TX delay)"; port_ctrl = PORT_MODE_EXT_GPHY; break; + + case PHY_INTERFACE_MODE_RGMII_RXID: + phy_name = "external RGMII (RX delay)"; + port_ctrl = PORT_MODE_EXT_GPHY; + break; + + case PHY_INTERFACE_MODE_RGMII_ID: + phy_name = "external RGMII (RX/TX delay)"; + port_ctrl = PORT_MODE_EXT_GPHY; + break; default: dev_err(kdev, "unknown phy mode: %d\n", priv->phy_interface); return -EINVAL; From patchwork Sat Nov 9 19:00:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11236109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02F8D139A for ; Sat, 9 Nov 2019 19:03:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D654621D7B for ; Sat, 9 Nov 2019 19:03:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oF27zpY7"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="cZpggyVb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D654621D7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=Bw8He4WOMPwfPtLw50VeruUJ0TWzit2uLOS++nR6ZWg=; b=oF27zpY7CikquRDYDXqW8tG30E b1N4rTH+qmYbiZroQgl9HtVBSarLxo5KthWluRkfsqTKRFRv+5l8c0SEfe91PpF4tCo/wxDrPnaMN dKidL2iUsXB1jGYjrcUUu+3SeJD/L1aJnWoBPf4EPNazBAf9pYZDd2Tr0uXMjlv0wqls523fXEYzH gercHy8q5cwQdwf71QuDRnqDTVNyyEZmJvMpPX3U3nr/8+23zo/Sykhuiy3Tl1mlPpvNI26p5oSgP efiEB9Zxzu2wpU4yBpC/Ug6aD1hqw0S5KFflQiGx+Lhm4Q6o3erOJ2wsAmSjl11dZn9fxgDYwbTcb U//OMsLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTW0k-0007XM-2N; Sat, 09 Nov 2019 19:03:02 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iTVzr-0006n4-7G for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2019 19:02:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1573326042; bh=am5k+ShH8U/QfQdyBRZNILtXr6ux5dgQyoLfNDeiNlM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=cZpggyVblENYQ8ikzV3r4BcTVr7iUbdFFO0vGhP4E0prQQMVaC8FJjxNXMyaU0W56 Yc5thYPFmb1lJKMv7B4OJYhsC/JCvZ+3pAT0c08PmamjTxQ3iGpKwTBA0yqaCjKw+V iHozUROD3nlt/ZFPCp614kLZ256rHiRBKqx/jMWg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MlNpH-1i46K43UU9-00lpmk; Sat, 09 Nov 2019 20:00:41 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH V3 net-next 7/7] ARM: dts: bcm2711-rpi-4: Enable GENET support Date: Sat, 9 Nov 2019 20:00:09 +0100 Message-Id: <1573326009-2275-8-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> References: <1573326009-2275-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:0oger14fwpFQo8s87jr5yrqC+lDUCdi9IE6VdOjEBDE/rVbwlzG iYpUGckhrV1HUKj3aVRXJXtn539zkzIoK2SF64wVFeAuCzWN8DX2l9ceVSn0kwMh5XhWzC/ B6INzHgRuZOyaLx+NmsM2obXgb/BvEUDD9pP9QvGESGr1wBHHo+zkbwL5TKxXiIJpUVyRNw lhp4bRTVvUJCxnouvN6zA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4+Xt7+RTBHU=:VS24gW3EpEapiurPZu4hJt 763PrKk9aWi5WOTtTm4JoR/QNX6LR6BiEU2LFDwfYpUShTl/RZO/GDKiZj+mEuTFMlrT4lI8X 247uhgbg9an/tvWNkSRH6hV3y1/RTy73ODaw+Rd7UXhgcb3/7VrWx9gG5D3z61NF1SGf6pZJ2 NV05iSOBPzvKoOFV4T6K4fzbfO8k5UQHQGg1oKtyzbNcbjchK9ZCZvEwY9pMkSb9VsQcSb5sK TIeolYc3EFyXHgYF9H79qEEOjprPdyrUgCmng66MYqX6C2nsoKRdcAwNvymJMn3394FooYVV6 /IK8047Gx06UQHD7+BhIMIBIc3HfiPgNMnpuWAVQdUhJdyV1GsVHpAIeiXsiIGJ93jOza9Q8R V51bVR4vdMatyhZe7jQjFC6ba3xNwGw5eIO7BeIcVnJV/tDfsSzh6VF11TjzBTj6OgwEzA4ZJ HY4tOjDIraslDfEXA6tf8p/AkgSaX2GweQKrotJSEljkpIbdtBk6bffo/pqrqyCzL9C7vhi22 erFF864RjHqznNyNv/Hsfeju//xII5u4uqG773jo7IHQekzED36ZhOl+nfVzOdA1bdytv7ap4 mRl1eOWUtYx0qZpQY+YI5CrEJhWZXb2eZ6nt3BWBnAqLdX8vf7TdcZjXt8SMR6U3R1SVWy+KO A/W4aKCJllzntt6uyw11U5+UOPTF+CrCoSiY4EUXf42QRppymKXDi1wbunDF6SJoGmDReFXAb Tub4M+3VRI1f2msUIzIadh9Bgd2G1YPqlxr9euWOI3GvrfTqs88gcYYJQ4Xu1bDR5HcfjpeJN Qsxrbb6w39lLTZBa6iDbGMSmbtHDU2WlJ7ShIII3WeeCU8+U9+ijmE93NsxvqcvuSHCai1PHF V45l28+cQl2K4ipHAFyhItEX/8pFhx2Sfz8O8qbyOUlXLcRe0lGixPW7YI9v2tgkt3DKMA2Rh mUcdTy1GLDtRz3+NiBcD9IdtEZawhj9LUYjfvOI0SNUaM4x4lwfBah6l5NhrHgXWRIdWQdCna kkYBn2CkUvceytdXz5bb5HtQT3eWDogN/nsdENu63ji8bxLBXlG9e7Dt9viIT/2Zj0zSN1H6s ThWvnH0qA7mR6pfxs60MGEaPvXfS9hycYTz+ukkAIwa+uFTfrx3H+rZ+j/zxfWNZrUyj4uUGi /FjOCMH65RqfnFm7hh+FmyIlLFQB0f7eOkd4mfhRjp6LZkuJf0iIFKhTY9iK1HVv5pEcGLXbf W/+7Kvd3ldYzOTQV6e5zP6k1EkJL5Epyz5aMSzg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191109_110207_555485_AE381278 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.15.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (wahrenst[at]gmx.net) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Doug Berger , netdev@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Stefan Wahren MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This enables the Gigabit Ethernet support on the Raspberry Pi 4. The defined PHY mode is equivalent to the default register settings in the downstream tree. Signed-off-by: Matthias Brugger Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++ arch/arm/boot/dts/bcm2711.dtsi | 26 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) -- 2.7.4 diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index cccc1cc..1b5a835 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -19,6 +19,10 @@ reg = <0 0 0>; }; + aliases { + ethernet0 = &genet; + }; + leds { act { gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; @@ -97,6 +101,19 @@ status = "okay"; }; +&genet { + phy-handle = <&phy1>; + phy-mode = "rgmii-rxid"; + status = "okay"; +}; + +&genet_mdio { + phy1: ethernet-phy@1 { + /* No PHY interrupt */ + reg = <0x1>; + }; +}; + /* uart0 communicates with the BT module */ &uart0 { pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index ac83dac..a571223 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -305,6 +305,32 @@ cpu-release-addr = <0x0 0x000000f0>; }; }; + + scb { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <1>; + + ranges = <0x0 0x7c000000 0x0 0xfc000000 0x03800000>; + + genet: ethernet@7d580000 { + compatible = "brcm,bcm2711-genet-v5"; + reg = <0x0 0x7d580000 0x10000>; + #address-cells = <0x1>; + #size-cells = <0x1>; + interrupts = , + ; + status = "disabled"; + + genet_mdio: mdio@e14 { + compatible = "brcm,genet-mdio-v5"; + reg = <0xe14 0x8>; + reg-names = "mdio"; + #address-cells = <0x0>; + #size-cells = <0x1>; + }; + }; + }; }; &clk_osc {