Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3099300rwb; Mon, 16 Jan 2023 03:49:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXuPseP7kkG+c2ae3rLVplVRdQh/cwL0DFFHwPsap4EY15Fg9I1brQxinb5PuMCEM1U9+jmu X-Received: by 2002:a17:907:6d12:b0:7c1:79f5:9545 with SMTP id sa18-20020a1709076d1200b007c179f59545mr109348488ejc.42.1673869792822; Mon, 16 Jan 2023 03:49:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673869792; cv=none; d=google.com; s=arc-20160816; b=q473w7aqZlkpk3Nelzem5bBwnHgRnv2SGQYv61mvZmtGnCoViZ9n9XEo6BbtpWQ6k3 /JGHWa6UPWBBrQP83L3sphEFm90cE8rVLFFr1XlslSXtHrwooE5G2ekTdUq3cBHqLrk/ NqosA8s6aWHP1I6lUmxZ9FWhkzQt+mHcqlIuJ37j6LxOuQD9KjtGFiaTNWmUq9PGbB9j kUtOUno0S/ZjPWOcGJH13jJPuRQDbbKQiMRxrHgLwBfSnTzAqKGRcqrXK/jaxg1MOIw2 4+txJH23XXuqw7uQhwv1pip0Me4CRUuIQrDixiPEGXiCIKKmwCr4tj00baN1MCz+GSNS xoLg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wz11-20020a170906fe4b00b0084d354539d7si6312076ejb.195.2023.01.16.03.49.40; Mon, 16 Jan 2023 03:49:52 -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 + 51 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?q?Cl=C3=A9ment=20L=C3=A9ger?= 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?q?Cl=C3=A9ment=20L=C3=A9ger?= , Kurt Kanzenbach , Revanth Kumar Uppala , Tan Tee Min Cc: Thomas Petazzoni , Herve Codina , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.39.0