Message ID | 20230208164203.378153-4-clement.leger@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3559676wrn; Wed, 8 Feb 2023 08:41:43 -0800 (PST) X-Google-Smtp-Source: AK7set8q7/q30gB0F4OE1KNo+/tSSz6AYiQ4CmLZ2Hm8BSsQbcLTKjuHYIVzcpMAUGEPAkrAu6tL X-Received: by 2002:a17:902:d4c3:b0:196:86c2:ee89 with SMTP id o3-20020a170902d4c300b0019686c2ee89mr8317778plg.3.1675874502760; Wed, 08 Feb 2023 08:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675874502; cv=none; d=google.com; s=arc-20160816; b=vV1/eB1xp50u1yJtfUc+tmePzqtHe6AqwSu6j+AtW86mI+0WXCi3PMXz/kINezoFm3 Sp/RHfmnibiutfRQ7KbpkFVhJG/1vWgu7UXKfergha3+T6yU6FT2x3b9/MRdr9HrSDgY BJRh+ZAFwviRyfaeq+ZXRWv8Cfg/soQqGjgWmogN0Q1tCXLW56VYxiTONu6ILhJg1K+g eWj4qS1CttYNOTzWwdgyXY3EN/iK/PQvmq964xBvUtdVQA5KxN632WrFH9K7SN069/gB ewbnVcok8AAbeXnYZZw7Ag7Q/FMN5B/BK4Ea1sS/GfXMzCGezWYC5GGUcnxEy4bKsdPa WRWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XCj30NsK+6xPXdqbwOoZtwRO/ZUoDqTO5hHn+iKnF+o=; b=CtjeUoTu5yUyWGwdz3NSjE6iUMaL/wULnBmA0LAkpgInI7sKM14r5AavTlFSH02Nle Mt9WCSBhtDQO/3WTaLYrgwEvKDFKIqWRBFtJGfuZaeSO1gVO5yVQgJBZ2t7QxVM/u2Zi kNTzA/ZgAAruwEE6cHnfMXeREEQdWTrENKj7Lpopu3Pe/iZPlmv79BbhyqGCj9jGg1mn 8tvt5JswHJYq4ExYj3b22h0NCNNPuyHRYeF4Yr2kxUqKIC85LrWUQw8vdM6cQaUO/BL1 9WHsucAF1a+gGPnqJtZI8nc5TZL1m5P6V2iG4BHhJR7huHPK/tiIEOgXw3XEmQoARpLc dOaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GTQjKeKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a170902d48500b001931fce6511si20593842plg.374.2023.02.08.08.41.30; Wed, 08 Feb 2023 08:41:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=GTQjKeKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjBHQlE (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Wed, 8 Feb 2023 11:41:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbjBHQkg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Feb 2023 11:40:36 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37474DE0C; Wed, 8 Feb 2023 08:40:30 -0800 (PST) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A60E81BF211; Wed, 8 Feb 2023 16:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675874429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XCj30NsK+6xPXdqbwOoZtwRO/ZUoDqTO5hHn+iKnF+o=; b=GTQjKeKP6jCXB+susoQC6r7Wao2poP1/a4Ob8/035exSTjKkF1n85RREgusN779F90UUSp VAD+NeoYQcdm/pZDqopInkA0VBppi35mawnAN1AiQBezpmMkBa6qjkO+kqxXeAOhM34RLA zgx8CfO5qDXiseFzrakMKFj1fQ5hryT90ocK92GhvDoR93YZC8CfYFDasvnnHIjDB0kARr psn2hP2/+EyIeEdbUZY5jol+oDQaeVv02aZx6QxRwC1jcmL4xlKHhLHMHJ6dreVIiUJ8BO 2Rp3Q6RqOf4mEIor/Ahx883YWs1ka9LFFypyBrrtceDqIeQRCPr9ktk7Uj5tbw== From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <clement.leger@bootlin.com> To: Sergey Shtylyov <s.shtylyov@omp.ru>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Russell King <linux@armlinux.org.uk>, Wong Vee Khee <veekhee@apple.com>, =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <clement.leger@bootlin.com>, Kurt Kanzenbach <kurt@linutronix.de>, Revanth Kumar Uppala <ruppala@nvidia.com>, Tan Tee Min <tee.min.tan@linux.intel.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Herve Codina <herve.codina@bootlin.com>, =?utf-8?q?Miqu=C3=A8l_Raynal?= <miquel.raynal@bootlin.com>, Milan Stevanovic <milan.stevanovic@se.com>, Jimmy Lalande <jimmy.lalande@se.com>, Pascal Eberhard <pascal.eberhard@se.com>, Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>, Jon Hunter <jonathanh@nvidia.com>, netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next v2 3/6] net: stmmac: add support to provide pcs from platform data Date: Wed, 8 Feb 2023 17:42:00 +0100 Message-Id: <20230208164203.378153-4-clement.leger@bootlin.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230208164203.378153-1-clement.leger@bootlin.com> References: <20230208164203.378153-1-clement.leger@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757281782554910648?= X-GMAIL-MSGID: =?utf-8?q?1757281782554910648?= |
Series |
net: stmmac: add renesas,rzn1-gmac support
|
|
Commit Message
Clément Léger
Feb. 8, 2023, 4:42 p.m. UTC
Add a pcs field in platform_data to allow providing platform data. This is
gonig to be used by the renesas,rzn1-gmac compatible driver which can make
use of a PCS.
Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
include/linux/stmmac.h | 1 +
2 files changed, 4 insertions(+)
Comments
Hello! On 2/8/23 7:42 PM, Clément Léger wrote: > Add a pcs field in platform_data to allow providing platform data. This is > gonig to be used by the renesas,rzn1-gmac compatible driver which can make s/gonig/going/ :-) > use of a PCS. > > Signed-off-by: Clément Léger <clement.leger@bootlin.com> [...] MBR, Sergey
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 9a8721227b17..8bf5f73eb4c8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7295,6 +7295,9 @@ int stmmac_dvr_probe(struct device *device, goto error_xpcs_setup; } + if (priv->plat->pcs) + priv->hw->phylink_pcs = priv->plat->pcs; + ret = stmmac_phy_setup(priv); if (ret) { netdev_err(ndev, "failed to setup phy (%d)\n", ret); diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index a152678b82b7..104b3d1101c0 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -273,5 +273,6 @@ struct plat_stmmacenet_data { bool use_phy_wol; bool sph_disable; bool serdes_up_after_phy_linkup; + struct phylink_pcs *pcs; }; #endif