From patchwork Mon Jan 16 10:39:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 44073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1124188wrn; Mon, 16 Jan 2023 02:46:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXsygVieH+YCSY1AMiwL1NYtTxipbFnJ5YNiQnQavJvjIjLyJmpOm5ZMtMWlIE0QfySKm7s6 X-Received: by 2002:a05:6a20:d69a:b0:9d:efbf:785c with SMTP id it26-20020a056a20d69a00b0009defbf785cmr97140742pzb.17.1673865988604; Mon, 16 Jan 2023 02:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673865988; cv=none; d=google.com; s=arc-20160816; b=ConbD9/kRNxbEYU2606GPeLtI4udtbeJbUePziI2UX0j1hp812dwxYishbPq/1gELi KEcPGobvtfW4T/gJCgJqBmX+WdQwr/HHFLMM5JLX5qCDN9qcjnYakyD6Zew3o2SiU5Ff xKY2bURDxUSyCUh8GYrAuSU4kIS1o/HqFv2sMZx1E3m7KKfNNWUXp8xA8ol/flwTvpUo LxaA9hVQw0tOaZuPxTBrf87nTJXJDqVdkyhE2llPeYEkWKfZcDVl2ovifMAK3Ftia568 9dHyvUH9DaHDNmHbLhI/ye/DLL0CIOxeSreFOe4AdBtxyF3iANF/La6DwNelrVQmZ0ik XsDw== 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=zFrzbQs6DBkVtnyahobtjh31MGPBAW1dTiQwftQXLks=; b=ioc7EUDTQZome0KLwbkQTgTQwZnMmilbcMtT3TB/W8qDryiMS7xAOhyVtfTpddiOPv XFkqH4J2waBJUEy6lkKpTFaUI36KpVU0wdV5APXdO9jwS8w27yw+LldNRgsjoMczI+A5 hurcnIm5xuipXHuKtdJdT2Et8qfwhZIFmEDeAHiyqkdmWf4uqnhEY8cNVY4ZldjY8iQq RvhAUCGo/el4aGCnddu0SQM/BpgTV6kSsAKy/OomCU5BWZgZRPOJ15bH/kYovCofyFkP VWboykGyq9rOQscX0bNb3v9aJyn9M1FcTyD6LoAltPbSHokILpVZ6HV17zOdDW94ToYQ txlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lpOY2YAK; 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 me6-20020a17090b17c600b002298af2eebbsi724390pjb.1.2023.01.16.02.46.16; Mon, 16 Jan 2023 02:46:28 -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=lpOY2YAK; 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 S230389AbjAPKhz (ORCPT + 99 others); Mon, 16 Jan 2023 05:37:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbjAPKhe (ORCPT ); Mon, 16 Jan 2023 05:37:34 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A80001ABF6; Mon, 16 Jan 2023 02:37:32 -0800 (PST) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id C22B81BF20F; Mon, 16 Jan 2023 10:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1673865451; 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=zFrzbQs6DBkVtnyahobtjh31MGPBAW1dTiQwftQXLks=; b=lpOY2YAKxIV5kGlhG39PrZHAd6uGqVMMIdHp8QLXhN4glL0P3+iXbJeJBmbQfnHzc0J/Wh miZw8GwjzWcThFHEgjnLGIqrLBzdIJnK6GiyawrCr64Cp9MbfpU9QpgAKY8Zxko7W8HezE VoLIbn19Yoj3VGe3PypOD2GrzelhKh1aqmFnSzTh4dD/A3bRfvEQbie64UZwC5VcaKKifW p7XLa8GdPUOBTBJgsjmj5hheWuCggbO/6Vq95S5Bq2+CHs6AvnyYtRWGS0eD0E+wf7Fn5c kiyBXu0I5N+HGgBr/zT/mpuNGo2luzPDZ/D51B3dDw8gOYWHWhEkBIjcAIg9hg== From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Sergey Shtylyov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Geert Uytterhoeven , Magnus Damm , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Russell King , Wong Vee Khee , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Kurt Kanzenbach , Revanth Kumar Uppala , Tan Tee Min Cc: Thomas Petazzoni , Herve Codina , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Mohammad Athari Bin Ismail , Jon Hunter , 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 2/6] net: stmmac: add support to provide pcs from platform data Date: Mon, 16 Jan 2023 11:39:22 +0100 Message-Id: <20230116103926.276869-3-clement.leger@bootlin.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116103926.276869-1-clement.leger@bootlin.com> References: <20230116103926.276869-1-clement.leger@bootlin.com> MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755175702459659966?= X-GMAIL-MSGID: =?utf-8?q?1755175702459659966?= 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 --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ include/linux/stmmac.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 19459ef15a35..f2247b8cf0a3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7287,6 +7287,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 83ca2e8eb6b5..af09d5e0ca4b 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -272,5 +272,6 @@ struct plat_stmmacenet_data { bool use_phy_wol; bool sph_disable; bool serdes_up_after_phy_linkup; + struct phylink_pcs *pcs; }; #endif