[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230116103926.276869-3-clement.leger@bootlin.com>
Date: Mon, 16 Jan 2023 11:39:22 +0100
From: Clément Léger <clement.leger@...tlin.com>
To: Sergey Shtylyov <s.shtylyov@....ru>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Russell King <linux@...linux.org.uk>,
Wong Vee Khee <veekhee@...le.com>,
Clément Léger <clement.leger@...tlin.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Revanth Kumar Uppala <ruppala@...dia.com>,
Tan Tee Min <tee.min.tan@...ux.intel.com>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Herve Codina <herve.codina@...tlin.com>,
Miquèl Raynal <miquel.raynal@...tlin.com>,
Milan Stevanovic <milan.stevanovic@...com>,
Jimmy Lalande <jimmy.lalande@...com>,
Pascal Eberhard <pascal.eberhard@...com>,
Mohammad Athari Bin Ismail <mohammad.athari.ismail@...el.com>,
Jon Hunter <jonathanh@...dia.com>, netdev@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH net-next 2/6] net: stmmac: add support to provide pcs from platform data
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@...tlin.com>
---
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
Powered by blists - more mailing lists