From patchwork Sat Nov 2 13:41:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224107 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 0F66A14DB for ; Sat, 2 Nov 2019 13:42:57 +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 D382D214AF for ; Sat, 2 Nov 2019 13:42:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BiuLc90k"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="cqdDaY1d"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Zluhl/HQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D382D214AF 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=ihAuNQ83RwBxcpNc0YNSXA0IBRk3cN6vbL2gBGLunE0=; b=BiuLc90kUv/6+vM51Pc9sSY4mo FwhR1Q9yWy3U1DgRpHtrGNuxsv3K2Me07dfB8CC8nRPQULiOxyv4tXdH0i4D59n7bLqz3SG1TwAcf KcHShjBxM9fkYehZa075AD+X9nZ+l/zixt0xIQ8EGeM7YqnPilnEFwyrIjlBjrVLDwrg/wEnD9WyG argI+Hop6ZgS5cAy1Q9PeKu0/igE3S8TnJ09Put8xl8Mmu/nMwGsbw7VrSWrsHeNFehn0RwBuN1ND zm7nuUWD1mQpwWfCKh+7lcG6WRKgT/wz+86qi1OyVfSnRkbctRNkN9YtE4FRjaRX25v9GZR1rlPku sSjFc1Rw==; 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 1iQtg8-0003CF-2V; Sat, 02 Nov 2019 13:42:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfX-0002bi-UJ for linux-arm-kernel@bombadil.infradead.org; Sat, 02 Nov 2019 13:42:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=qNraPAnob0rxBqsJD296BXwCwdfv9IrOGozERg6GI1s=; b=cqdDaY1dVEfstde/mpMR4eEXJz EVk8EF83xvjBuMQQwspVhopoZswFbDBDD2unLAkf1i+Nq/aCpQaS9mT4EYotsy3DwTXbLdtg+1tI9 kvRzgZ1oadcQuQEUAUsKkomfmKyFLG/gE+neEK30HFzGXCkpUcws56t97YnjD9sNSQytaTp0SJP7p /IBUoNsx31Y4n44FeF2TOJKQBOjGaVCtbXD8v7V736iEnqKIOS/wVp+FBycQ8GVzcMMmMk6BnDWED IepH2ErARUdTv6v1sF8QIl11rA1PR9QVhLetHu2iZQUFKgYEtf93xVdkSBSVQZRFiZyTUrfUY0r6q /fYiEKuQ==; Received: from mout.gmx.net ([212.227.17.20]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfz-0001b5-GX for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702114; bh=Gt8mtaRoWgef35XMJ2bznCxioijqTL1JeO9yIP8m0jk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Zluhl/HQN/QJi8FpCGnsv3PiWab2FfFsaZFJYue2XZUDutAZF0s9dPtXFWBY8anxo cEo/GLhNmvRcqmFof0fI7tnotkXNjyd2q+8ajBh4oXjKP/IMu2ZxkLUKgM4mtNjLsZ bSIx3yJLWT0FF0rX+OhjTxlveNJLjkoPHdJ3zZxg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MIdeX-1iCMvk3Ent-00EbY9; Sat, 02 Nov 2019 14:41:53 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 1/6] net: bcmgenet: Fix error handling on IRQ retrieval Date: Sat, 2 Nov 2019 14:41:28 +0100 Message-Id: <1572702093-18261-2-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:4KOkdHKpqwUQBL+sP9jFmD/wRZEjL6GMtTHhcX3nD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TJsAw3lnTPFAjVxZJBt5F5ejF00T5PwPDdFvFlLeiPcwG7GJmg/SzCnVjESlXHmroFcAoqnV anU6JGxqvLBICJ4xpAMSjcjkSVF0pdKxsj0UqLvXTseQ+q8jBEDw/OLJN7aJhQvvkZ61//AY0 F+hEW2wjWTB4zrejq+zF0PvuN3pg413NCtUKX80CMaC5IL8BhutDzzh32/S96sNHAPiiuCMyg 5FrucD0SWpksEI2yggz5ORYIOY2UpCNX0sE9UasftU7ay88FB4j+TFpIdOmui29YDj0N/YjNm JMEllR6rYUivjsP1lJTOMxlanwMDY+J5bxMMPLVsc58DgHvrOs1Brggx3S80ywWP+brHs68EI 1cbMRZSB6ugrKAlifwY9m/EGtI3tFnn1GCBjVeshTsfpz5mZTtkFpl2huZxywOTzZ8DtqnHpx x4JVjrhUcbLDCf9kWDTBxov+AmwMytHWpJoTE5Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_134247_628179_7F3C6254 X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on casper.infradead.org summary: Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 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.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 Message has at least one valid DKIM or DK signature -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 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. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Stefan Wahren --- 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 4f689fb..105b3be 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(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(pdev, 2); if (dn) macaddr = of_get_mac_address(dn); From patchwork Sat Nov 2 13:41:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224105 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 D7DE114DB for ; Sat, 2 Nov 2019 13:42:44 +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 82891214AF for ; Sat, 2 Nov 2019 13:42:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lLH/IUm4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kuplRVac"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="RkWQLl7a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82891214AF 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=QSLAVE/3FRVH7GTvFpWVni+6j+SpOBrE04xlfHONW34=; b=lLH/IUm43O8lHRihvRVPillZWk CuXj+sgrxsSn9i7j87LPhF2RfZ3Mn0sdejOfQRtM5o9Kov0ispvacPf0bhYJNutE7cnVm7XkLGtzt lg63i4Hc6n9VxkaAsMywOS4S6uhWFlYPKIv2t//veKS6opEPJ2pqHjpUSgMT6zmV0dxKD2A9o7/Or DsHo9S17chWCRrdEx7H36O0ucQPo7Z4tkKf8LxgydFWLrHAFxEHrpIekD+NPZ0D0H/yqu6Pp7KhNR RhNYORuWTjwHovWbgRSmjVwz5YLJp2Gev9yybFLjd9ODNkE2GxJwjwp8fZ9cqCIsBhqgsY9NpD6wQ Vh+D6ZZg==; 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 1iQtfv-0002zh-2m; Sat, 02 Nov 2019 13:42:43 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfX-0002bk-VX for linux-arm-kernel@bombadil.infradead.org; Sat, 02 Nov 2019 13:42:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=2yfWJqB0ed/KYV7bbtLnrJs31Xt8meKCH3j8k5uNtxE=; b=kuplRVacvmDWy0OwoFllMx+iW4 PY9dvfsX79gqPlnvBvnwSWBIxaBnXYQ8JI78OPkE1mPffV6Hid2Y2YU8bJHemJTj3Db5LCBx33gzD KXfHqA/l7BkikiYEYPMiC/hUgszcHVPkaJoz0N4rN4cwbrC2FKv+H+UJNxljj5ce6PgjcjOVyISiW EGR7C7hdWYLdtQgJP/fIFRaB9PYRHD7HxJUpackgCeni1ppTJDDrVydz2p+qfKNjtyKGCefzT0jfR mIAypHLYa05jhD8GhwCbpZEDxO7BN3YC5CjitXYS3KKvmAh7sf1RtqgRxvtDeJ/o2hcOSs2yNEj5+ BoZ5mghA==; Received: from mout.gmx.net ([212.227.17.20]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfz-0001b6-GZ for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702114; bh=t37Bbd37Ccjo2tsA8xcaxuE8pZbiD+UMaXKQ1I8p+k0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RkWQLl7ajsSGAWppXkAWFfzu/FRxiVAX0iYeu6TYy18syol733oP5k79lM1zj5uqa muXwOjqwsOiCCByny10bR2m4w+c7MmnNzImA/dX+/wuTxxJS6F3CZfehFhdnxT2TGP tvETtUZhCvBxxfyh0BO+zeboivi7B+sX2/Hyrumw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdNcG-1hrYqQ0udk-00ZNVM; Sat, 02 Nov 2019 14:41:54 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 2/6] net: bcmgenet: Avoid touching non-existent interrupt Date: Sat, 2 Nov 2019 14:41:29 +0100 Message-Id: <1572702093-18261-3-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:m70ZrcwjQDnPhyAoISCZwujzpEcNMroE6UD6xkpYQpJr0Stf0e1 U/xs+b03It1McpME+nIS0a1tNlbl9VYbgBwyYENB7ug+O0x/3HfWu1QwhfBymzLB/CHFpJr 4t+I6At5JhECJ9jAPQxPral/jbWZM+y3OGAc62QzDOIMhGY66/LCZ1hXsnGFTZQvmtNXaYH 9BvIaHuqz0PMVExPlWRMA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:a2cd4/ZezW8=:INoGZaVH+y9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FXC3VslK7pY5D/eH32LRPhvc6Y rA0rAe75XV9XBMVcJ1GPTVx58ffn471sypWJIeVx9ds22tgC82gM3jtdQjInVD084okx0O5Mz +E1NHOBSEmp8AYJx8wNCnp6mmr21n6DdXaDPx0lekh4N8BSX5pdqOK2MZar/zjQeNPOKv+N4j OqU+Pr+QXEhooQAJwaKojNK1cdY/7DqPgtP5QMw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_134247_632844_6876CF48 X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on casper.infradead.org summary: Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 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.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 Message has at least one valid DKIM or DK signature -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 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_irq_count() helper to avoid touching a non-existent interrupt. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Stefan Wahren --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 105b3be..ac554a6 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3473,7 +3473,8 @@ static int bcmgenet_probe(struct platform_device *pdev) err = priv->irq1; goto err; } - priv->wol_irq = platform_get_irq(pdev, 2); + if (platform_irq_count(pdev) > 2) + priv->wol_irq = platform_get_irq(pdev, 2); if (dn) macaddr = of_get_mac_address(dn); From patchwork Sat Nov 2 13:41:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224113 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 0DF0814DB for ; Sat, 2 Nov 2019 13:43:44 +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 DF21D214AF for ; Sat, 2 Nov 2019 13:43:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SL+APKu4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KMIaZWr3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Ht3ka2QP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF21D214AF 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=egJMdchE15EDkcfJL1QhGH3S6X7jtGvhyFN1kxUXiTg=; b=SL+APKu4hW8+1AAf3XMJarfHuV bODvG0tyip1odPi/nLs8QEoD4tWSPsBM/d1X+Ottjs1JQyqlnRDKBv59PnPcwSYtbUPbtq/OCHz+I ZhKvHHPkmzkRe06SiBZcXitQXzsIl0BwFtGxti7jDotMVgdrixBYoKiaReFi1MZZ+qn3RqtpbT0tU EoSVtzW/LEZF12jslIFtSXIo35BSNxSG5GUhzu1MjHPxzTFHO16Lyhp6+SOObsAa7rCRKtWqGQ8zb PLcwkr7NDdxwAJGMZCaLFBz3Pp22ELvzvlbmaGMmQfU+B9B9Na3+LJlR3DCTe9A789R2if+mWt6dZ tVdeLOmQ==; 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 1iQtgr-0003xA-TY; Sat, 02 Nov 2019 13:43:41 +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 1iQtfe-0002iH-47 for linux-arm-kernel@bombadil.infradead.org; Sat, 02 Nov 2019 13:42:26 +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=MjlfGXhCyeC2CwSiW/4mY80WIUN4vTXPKxkAj874Ydo=; b=KMIaZWr3L+LfIyc8MYOPAP85/F c5bQmpNJ5lg4/nK8buAyYgY3Fe4kALGgcJnR6K9CmKN5CffYaodkkyMsPjMgnMYChN7rw8pZxZTZ3 Q96NsNaodDqS3vM43kFfOWdgDMXCurxMNge93IW+BBCOTJmr0yxxlQTpgyALh83koiS9LUxu9TxKZ /BcGERxM1svnOWnOa71RrrX3CxuoVInM7dnqMKmaOGV7v/lWOSZspbh32Yc712YBP1dWwknagrFXc BdnSYE588Qs9Z5y1PRja6t0hojw0EzCsjjv9VHRw810s7yQbZQsoNuXcDcGnpUZg5XiUN6AVIXeyY Kldd/UcA==; Received: from mout.gmx.net ([212.227.17.20]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfa-0002DO-JH for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702114; bh=Kq8jVv4KTT/YEFqTzeDy0DyjuJ0jO8lh0ibZKH2OXh8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Ht3ka2QPxdW/avugLVP1F7v4AW/+qWpbLD0OytfiCkbj8XSZ2rltSa6EVUOdAWAjf zP14DGeXFAEQmZOw/oRdp5fW0Joc7Q8uUc+/3gL1tH2NxjHbr+uFL24+qoypJIkptB RgCKcoi/t80fyg7t9vvFybEeV41glDeUt1yqGzRs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbG2-1i8fky2rna-00shZa; Sat, 02 Nov 2019 14:41:54 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 3/6] net: bcmgenet: use optional max DMA burst size property Date: Sat, 2 Nov 2019 14:41:30 +0100 Message-Id: <1572702093-18261-4-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:+ydjqLwQaCCuVahtqEKzjJXqL9Ne/Q5iMTBvbfN3R6S2K5c4hwX LNswrb190cgkUxjuUhHIFTydQtBZ8LWWMYKqv8EOInLc1r1AeEsfxWF96SOlC3Sm+2pZr6u mEveIih2H+AOE0vf31YY7Eur3dLhwqac0AbgNss4wW5TG58b5p3EhyH4nS4q7DTKiJvgL/K qud2WqYF5i9ywzH7eSorw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:L3iBkhP8wEs=:1HEfBsxwIJyRLUPTQwuZdE yu/JLTUKkKDKmfPEVXNPdWQtR5mTbVB/B9p/OzXrKTJ1gqRx4s2ntufda6vIZ2scJXfgjA5Qy Sx+DxH8ReMTubbCVe2iuaUfd4dDAa0NBUSBTa0JZzQRI97r3T0S/mmah6LFQ1tPOal5rccktD 46VJpLK750FxqPwj+CQaXBftYHDSlKBFF6+Esesfx2g83x2D9T/NiGYpz85Q+UnLCMtDfejLE Dhujx5lxszeBrNzYdIUdDnRlt5Hj48EP1ko+7XN+w90kpqo89mYUKCyWBSl3+kju0tsDKUJdZ RXsH2bvnA2Vov/mabjidqRAKnwxlpZgMEZEU+5Gf6DQTUiLV2uJS71Fe8hkM0HO1RQaLUfJAQ 4FEij54Et+Hyf96oh7P852ZRi56T6pF7oa46iHME/+/77r7Hq8PDksaSlNJhVFhtv2aQLPy3R Vh91kc42wceZImPJFg9otqlrLK69a6K3Gwo0qtfjwoTM97BPosNhhndW0muNsEk0KBx2y+m48 1n3G1bsKk5HRlWiDdj9wQNkBJa6yuRMsJHRjhVPZBLoimk1glqSo0JuPcWur/JWbpQ9R2NCWy kCCrhH4LYPc8/Ydl/naTvEY971yhCVrlWqtD8/2x/055HQ23o/v+5wm/nlIlsr5bOJ2UQrPS9 o+u0wuqwG/9yTGJIp8Jzt79bcvvveupUwwIv2QLDzUm57kLAGBQx81Bnt47NmMdaXhC3GJHIi 2xJfuOt4cfQvajpAHFfd5SPNlx2Kf3842KGDJo3ExgAuj8mAfxPNS1Zo1IoCHFW+BAZO+bAAV Cl/Wcv4lNr1VA90iT7Utwz1gkP+9CGM/I2QWtb+u5/+mikE9IxzkANJJ4/5v6V4Jukz/fsRnn 6GrteYFSLBII493Hd/Ppks5xM+Sy3l6v5Pp/6U0PMfS6EwNJjgghUp/3VHu/jry8RWj850n0u QIpKBvlfVwVr9pX3l3KtqtGOzRkbkIVl+Ct+V92sei/+3TpehzjsBBGyafL1O0/4NgVzDUFtt biE9O04Bd2dellqA8HiQ1xnOJZ/GAraLR3Sqcat9n5+PHGkoJ8RK1sIFd/hVHWK2Deu+Kwic1 E5z2zaKaAuQuUEfyiWkWQCzifsaLGRY+Iby65/5Eto3+Kys3DvBPDRzzhDEy5Cfn1Mls0FRYx SFJGGzYiaXMXl8hKMIBnESEApFPYBWotRKUi3wVlM1TozpKhaaSNmSk3L7WGy/RrUdLZjqENN 03aiCxg5n2WPcrWoiA8tUc4sy31/RXJ+V5VXwVQ== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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 MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Matthias Brugger Depending on the HW, the maximal usable DMA burst size can vary. If not set accordingly a timeout in the transmit queue happens and no package can be sent. Read to optional max-burst-sz property, if not present, fallback to the standard value. Signed-off-by: Matthias Brugger --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 13 +++++++++++-- drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index ac554a6..8d0093b 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); @@ -3536,6 +3538,13 @@ static int bcmgenet_probe(struct platform_device *pdev) clk_prepare_enable(priv->clk); + if (dn) { + of_property_read_u32(dn, "dma-burst-sz", + &priv->dma_max_burst_length); + } else { + priv->dma_max_burst_length = DMA_MAX_BURST_LENGTH; + } + bcmgenet_set_hw_params(priv); /* Mii wait queue */ diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h index 7fbf573..22cde8c 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; + unsigned int dma_max_burst_length; u32 msg_enable; From patchwork Sat Nov 2 13:41:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224103 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 AF5B513BD for ; Sat, 2 Nov 2019 13:42:24 +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 4E7CD21897 for ; Sat, 2 Nov 2019 13:42:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="X3AhaFjv"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="dwAZ8qK2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E7CD21897 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=X3AhaFjvVoUl61YVcBg7ssaPNM V4xoV506TsUSfvAKhUcq+cglvApZetepzx9z3miMmQ08qD3Ka8yODwA8c25ym1HDfEntUZAwAxovd BOhqsHOD3hXnk1r56RTe0M3UrlaoEZT7xkbadPN5Npq37mQMMTR2uWk2J15fkAF4MwF3WGkNCGbPZ eRaX0gqThXA4XZQGGdyNPfQ75BcnqdIUIsnzPW5+O+fMSB6YVu4hWI6PAFaOWJAWWva0heyvJM7d2 gB+8zn3hBRQI8U05+M61MnTaVZRI0wqzEaNnSWzHddtbVNmMu3R/xERPqMwqgAuMKMEkvoVRQBvh0 z+qu6StQ==; 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 1iQtfb-0002ga-Hn; Sat, 02 Nov 2019 13:42:23 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfT-0002ZZ-1Q for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702115; bh=4tHGKE+e17UnhyLVKq76j3dokNGsfO7qmeQ/3LMCwKE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dwAZ8qK2mOEhL8yddYvia54XCp7WcFlWZgnR0N81rrx8bFhvyP/xySjIwrjcC+Lh9 UJ+Dr7+CieRXtyvxMdWefQX3mXv0nE9wq91rVLa3SFaxAjuq+WgbAA2BOJbw7waCxz qMDX48M62lJwn7xVgoOISiU6K+HmC1RRbqVyOSM4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6KUT-1htc7u0YED-016h8f; Sat, 02 Nov 2019 14:41:55 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 4/6] net: bcmgenet: Refactor register access in bcmgenet_mii_config Date: Sat, 2 Nov 2019 14:41:31 +0100 Message-Id: <1572702093-18261-5-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:MQ6Jl9aVlitUoMTuabDM7aRAHAZGevUik1OOtVe4QXl8h2C3Skv RtAT7SGqOqjvGXxwx+pfP9M3ilaw0Pe1Vga4EWl6/ZgbzVlmNCLBOUI//BYGmiciSOCMG9Z IZcdJaAzOY0idsx6XEN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rlDvGXmXO4ok8mdZQrIbXXpC4ECeRtvMIt 7Dz/FN0oln7Tla7ABdgPI0oeU5cAP9aHPSJ3pVbas7E212Wt4p660i/tf8Xf0VdJQnEnyoFB4 XRN634olQ05nJBHl44dIK0sITAlU5SvproXdMw+BOQo6Vxu6aK+JRWANdeWuMBWWine8R/SqO tyKkpXt944yyOD0TpT3Hmw9p9UmVSKsaPOJl0o0uDrxN8YS5DQ7StRwfSGaGVDjMrf4x4EMbP dE2Te/ltfm32kO7HneVxPOXT2YjnkST7u9oO4epg5AN88ppe0YohmIZoIajaQ/Muv9vL6sXz/ 9CNEF36cnQPwr0KtZXsUmC3DAOSz+T5cEyqmTxw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_064215_414485_9A23CED1 X-CRM114-Status: GOOD ( 12.25 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 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 2 13:41:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224109 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 3302E13BD for ; Sat, 2 Nov 2019 13:43:16 +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 D997321726 for ; Sat, 2 Nov 2019 13:43:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zt3hBbt8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="NSR4jjTc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D997321726 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=STjEK+fSWYieMiScGkgJPOuPU3lvN84XufKJJjcD6kY=; b=Zt3hBbt8564IkO1FRhm/Q2miku iCs7X3LFjDljS4OBrcAAs2D32kmI+VS0beqzADVfkxC7++T100732XC9j173HNk+Vxk2Cdn5y8dZ+ 67uhZlIghQ8BFOinuWj0k9ju7ERlArkXTHC765Qm84xnXV4iJuG1XvgEioKAtpLghUQXSG1efOWHc 87r1KUkfIf7ac3W34KdLYwd7jvyv5LvBShP/enXy3Er+MF4AFShhTExtdLD3QnbaTRPW/i+OJuCqc T8bhRl0mMu9w9lkilndowZb5MKH4YdD/l8hwFvIFKukDMST15WESawZdN2x+72M0HcmDoTBfGB4lT lKHhX8Jg==; 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 1iQtgO-0003VG-Nf; Sat, 02 Nov 2019 13:43:12 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfW-0002aL-OD for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702115; bh=B+2ielFzQfrNXcrr2rG7ypa++YSnuxddRmAyBorL8W4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=NSR4jjTcIbME/Mma0/vrjDQ+Eq3suj0eYWC2h6wu4yIE0LvpkpivqvCIDGhoP3C6k /U+tHPPbqW0FXoALDJRW/kuAGojfAj2N27bdshkDhjuIha9odbN3fhAhAdsMGqRoOF DilHEi9bqqLCG/vkKJdZkGSlxXDFRsqLOrZMA7/E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mzyyk-1i4I2n2Zp0-00x7Pu; Sat, 02 Nov 2019 14:41:55 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 5/6] net: bcmgenet: Add RGMII_RXID and RGMII_ID support Date: Sat, 2 Nov 2019 14:41:32 +0100 Message-Id: <1572702093-18261-6-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:YlD3liMtwTM1X67+rhs9J6Xk/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Ly5511X2afbb2F8WYw2Erf0XyY2s7ChLERpvJ1SVRC9bFQ4Mlxydzg5WO3Ru3XymcY1MPLY ZgyaDEqfw4OwCbCbDTVbSKIGnYoSOayVTMuCQx/WhX3lZLobzJNBeZNTu5JznzkmSIBB2naJ7 wE/NEM+kGdTJvXQfxqhg/+8ayhrlyo1zaB9vD2ldMF1WIDe2MmUGl/p1A4PAU0g5APxNxbap3 Qlr2Rb9tXOI2jJapxc4+94pTOfybvPr6fjPli9ZWF7eT449Vsva6mH1mFBuGGqfe05DuuaJyM WrNlP17t+2X9DpqVZsxDSpcJti8ci3VCJfeSfcvlKh3tGkd4vWV1odp2duCgqcwrw8pYjiN8w EQzNWFLgdfccn2WyJTyM3TjQB4ORh+yE8AR1uDEMHUY77M+RgLgC6pFwNJvOXX/5x8nYVgalo DsZuteUHJQ9HPt/SvlteKk58Z4DLnfl0KKuAPBQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_064219_094522_64BF2851 X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 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 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.21 listed in list.dnswl.org] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 adds the missing support for the PHY modes RGMII_RXID and RGMII_ID. This is necessary for the Raspberry Pi 4. Signed-off-by: Stefan Wahren --- 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 2 13:41:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 11224101 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 74D7313BD for ; Sat, 2 Nov 2019 13:42:23 +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 51A1A21897 for ; Sat, 2 Nov 2019 13:42:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hBuoKQuo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="c80KcgMJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51A1A21897 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=Z5LNhhGyFbzGJVLFGHUVwryLOhmCafXCUmDwOkK+VBM=; b=hBuoKQuosQHDGoOWeKWkXT5Dqf rJQMf+OJ+KJqNzAT73vGQhh5Y63cOFJC2xCJ4Nfa9ivCVxgnXCm/F4UYc0ikzMSrEDxVU7gHmfALM yuHztO7LzowuqWHFsZ/+PfWDeKbJohYUBqMGEzyhW35HqTe804wvTn2NfAj2tTr/6ktpkEojPdGeq 8LiTVsKvkWWIimqslmbAY8g6pBWeBD4QtWIV+j9WimJ7z2/3M4DP17NDX/Yzu8g9ZSzIa+sv5C0ps ixJUppulGZEjiEAcjiLpHg/gazBpUKzHVnjGf+lS5YDoVgugsCGgbq1Dm3e0mt2WFG3RbAZiuPXqs YXq+yfFg==; 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 1iQtfW-0002aW-Fj; Sat, 02 Nov 2019 13:42:18 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQtfT-0002ZY-1P for linux-arm-kernel@lists.infradead.org; Sat, 02 Nov 2019 13:42:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572702116; bh=h+XLGZgaXnLBawlPiG/UWpDjzgvkaAmMdoEeD7J3xyg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=c80KcgMJP7AgUKG/w6d+GdeCPFXqmxdehl+zHf+COyPYaUfCxPeG3S+grz0PUYOEU NfhVpH6lePgwjqNojo2OrmcIbySAkSa5Jzx4ZTU3PZDEVhoebi2ht2DE8OFqZUMvtK mXqTCU/Xbs0fjJCQu3hiKWR7YsWvs53f3TEmJBUk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([37.4.249.112]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MY68T-1iRqTx0JHJ-00YSmX; Sat, 02 Nov 2019 14:41:56 +0100 From: Stefan Wahren To: Matthias Brugger , Matthias Brugger , "David S . Miller" , Florian Fainelli Subject: [PATCH RFC V2 6/6] ARM: dts: bcm2711-rpi-4: Enable GENET support Date: Sat, 2 Nov 2019 14:41:33 +0100 Message-Id: <1572702093-18261-7-git-send-email-wahrenst@gmx.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> References: <1572702093-18261-1-git-send-email-wahrenst@gmx.net> X-Provags-ID: V03:K1:N6m+f5BFnGoJCatvwlFDrW3tbyCRprl/nNngMCQxjVeOZVZUmse crXhNJXNNQ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xg0fpTNfHVHYLNSlz4BiDOt5DzXRH Jv7yoKnaEFkX9JQcEt0KzkyQMSunEZPAxq4IZThrqB9Id/18rlwH9DJSgk9e/s4RofZ+bN7+h TZlGXIMtPNjBT1Ily+MBBvIr7bWnk4kliRNpdRZekFHKmOpKEUw8+CX2Y4ehJA4RE12WZzQUs 8c52jB72jqpegH9oAzRuPvn6KWnzmNsfEtu5HkIP02M1IVcOP2Xsx5ylCLP8MUuQbBllL5YAt ySlqzCo1PtxLfNra40VBMw0Si6nU5fdZzkJmZB1QImhlAnNZN746Q3so5lGVDpc34kFxJYA1f YOpRvkUfsR+RcuLSHPT1ZpwjDkSERZNk78nE8QjDaaa8d73QrJxpmOQ0I0on0z/ptStogYZOW XZFUNXthUeQjrdzDtTBbG24poMqxnxV9IqcGLHA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191102_064215_414828_6346335E X-CRM114-Status: GOOD ( 11.24 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 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_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 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: Stefan Wahren Signed-off-by: Matthias Brugger Reviewed-by: Florian Fainelli --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 23 +++++++++++++++++++++++ arch/arm/boot/dts/bcm2711.dtsi | 19 +++++++++++++++++++ 2 files changed, 42 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..904efe1 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,25 @@ status = "okay"; }; +&genet { + phy-handle = <&phy1>; + phy-mode = "rgmii-rxid"; + status = "okay"; + + mdio@e14 { + compatible = "brcm,genet-mdio-v5"; + reg = <0xe14 0x8>; + reg-names = "mdio"; + #address-cells = <0x0>; + #size-cells = <0x1>; + + 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..ff24396 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -305,6 +305,25 @@ 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,genet-v5"; + reg = <0x0 0x7d580000 0x10000>; + #address-cells = <0x1>; + #size-cells = <0x1>; + interrupts = , + ; + dma-burst-sz = <0x08>; + status = "disabled"; + }; + }; }; &clk_osc {