Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/11] net: stmmac: cleanup transmit clock setting
@ 2025-02-27  9:16 Russell King (Oracle)
  2025-02-27  9:17 ` [PATCH net-next 11/11] net: stmmac: thead: switch to use set_clk_tx_rate() hook Russell King (Oracle)
  2025-02-28 18:30 ` [PATCH net-next 00/11] net: stmmac: cleanup transmit clock setting patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2025-02-27  9:16 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Drew Fustini,
	Emil Renner Berthing, Eric Dumazet, Fabio Estevam, Fu Wei,
	Guo Ren, imx, Jakub Kicinski, Jan Petrous, Jerome Brunet,
	Kevin Hilman, linux-amlogic, linux-arm-kernel, linux-riscv,
	linux-stm32, Martin Blumenstingl, Maxime Coquelin, Minda Chen,
	Neil Armstrong, netdev, Paolo Abeni, Pengutronix Kernel Team,
	Sascha Hauer, Shawn Guo

Hi,

A lot of stmmac platform code which sets the transmit clock is very
similar - they decode the speed to the clock rate (125, 25 or 2.5 MHz)
and then set a clock to that rate.

The DWMAC core appears to have a clock input for the transmit section
called clk_tx_i which requires this rate.

This series moves the code which sets this clock into the core stmmac
code.

Patch 1 adds a hook that platforms can use to configure the clock rate.
Patch 2 adds a generic implementation.
The remainder of the patches convert the glue code for various platforms
to use this new infrastructure.

Changes since RFC: fix build errors, add Thierry Reding's r-b. More
platform glue conversions.

 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    | 10 +----
 drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c    | 21 ++++++++++-
 .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 24 ++----------
 .../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c    |  9 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c  |  9 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c     | 10 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c    | 22 ++---------
 .../net/ethernet/stmicro/stmmac/dwmac-starfive.c   | 26 ++-----------
 drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c  | 18 +++++----
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |  2 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 43 ++++++++++++++++++++++
 include/linux/stmmac.h                             |  4 ++
 12 files changed, 108 insertions(+), 90 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2025-02-28 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27  9:16 [PATCH net-next 00/11] net: stmmac: cleanup transmit clock setting Russell King (Oracle)
2025-02-27  9:17 ` [PATCH net-next 11/11] net: stmmac: thead: switch to use set_clk_tx_rate() hook Russell King (Oracle)
2025-02-27 14:04   ` Andrew Lunn
2025-02-28 18:30 ` [PATCH net-next 00/11] net: stmmac: cleanup transmit clock setting patchwork-bot+netdevbpf

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