netdev.vger.kernel.org archive mirror
 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:16 ` [PATCH net-next 01/11] net: stmmac: provide set_clk_tx_rate() hook Russell King (Oracle)
                   ` (11 more replies)
  0 siblings, 12 replies; 28+ 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!

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

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

Thread overview: 28+ 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:16 ` [PATCH net-next 01/11] net: stmmac: provide set_clk_tx_rate() hook Russell King (Oracle)
2025-02-27 13:57   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 02/11] net: stmmac: provide generic implementation for set_clk_tx_rate method Russell King (Oracle)
2025-02-27 13:58   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 03/11] net: stmmac: dwc-qos: use generic stmmac_set_clk_tx_rate() Russell King (Oracle)
2025-02-27 13:58   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 04/11] net: stmmac: starfive: " Russell King (Oracle)
2025-02-27 13:59   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 05/11] net: stmmac: s32: " Russell King (Oracle)
2025-02-27 14:00   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 06/11] net: stmmac: intel: " Russell King (Oracle)
2025-02-27 14:00   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 07/11] net: stmmac: imx: " Russell King (Oracle)
2025-02-27 14:01   ` Andrew Lunn
2025-02-27  9:16 ` [PATCH net-next 08/11] net: stmmac: rk: switch to use set_clk_tx_rate() hook Russell King (Oracle)
2025-02-27 14:02   ` Andrew Lunn
2025-02-27  9:17 ` [PATCH net-next 09/11] net: stmmac: ipq806x: " Russell King (Oracle)
2025-02-27 14:02   ` Andrew Lunn
2025-02-27  9:17 ` [PATCH net-next 10/11] net: stmmac: meson: " Russell King (Oracle)
2025-02-27 14:03   ` Andrew Lunn
2025-02-27 14:18   ` Neil Armstrong
2025-02-27 14:35     ` Russell King (Oracle)
2025-02-27 14:38       ` Neil Armstrong
2025-02-27 14:56         ` Russell King (Oracle)
2025-02-27  9:17 ` [PATCH net-next 11/11] net: stmmac: thead: " 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;
as well as URLs for NNTP newsgroup(s).