mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: dwmac-qcom-ethqos: Enable support for XGMAC
@ 2024-11-13  2:08 Sagar Cheluvegowda
  2024-11-14  2:51 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Sagar Cheluvegowda @ 2024-11-13  2:08 UTC (permalink / raw)
  To: Vinod Koul, Alexandre Torgue, Jose Abreu, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin
  Cc: linux-arm-msm, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, kernel, Sagar Cheluvegowda

All Qualcomm platforms have only supported EMAC version 4 until
now whereas in future we will also be supporting XGMAC version
which has higher capabilities than its peer. As both has_gmac4
and has_xgmac fields cannot co-exist, make sure to disable the
former flag when has_xgmac  is enabled.

We want to keep the default capabilities as EMAC4 and enable
XGMAC support from the dtsi based on the platform needs.

Signed-off-by: Sagar Cheluvegowda <quic_scheluve@quicinc.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 901a3c1959fa..2f813f7ab196 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -872,6 +872,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
 	plat_dat->dump_debug_regs = rgmii_dump;
 	plat_dat->ptp_clk_freq_config = ethqos_ptp_clk_freq_config;
 	plat_dat->has_gmac4 = 1;
+	if (plat_dat->has_xgmac)
+		plat_dat->has_gmac4 = 0;
 	if (ethqos->has_emac_ge_3)
 		plat_dat->dwmac4_addrs = &data->dwmac4_addrs;
 	plat_dat->pmt = 1;

---
base-commit: 28955f4fa2823e39f1ecfb3a37a364563527afbc
change-id: 20241112-fix_qcom_ethqos_to_support_xgmac-d1a81ea9cbfc

Best regards,
-- 
Sagar Cheluvegowda <quic_scheluve@quicinc.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-15 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-13  2:08 [PATCH] net: stmmac: dwmac-qcom-ethqos: Enable support for XGMAC Sagar Cheluvegowda
2024-11-14  2:51 ` Andrew Lunn
2024-11-15  1:08   ` Sagar Cheluvegowda
2024-11-15 13:22     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®