linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] net: stmmac: add and use library for setting clock
@ 2023-09-14 13:50 Russell King (Oracle)
  2023-09-14 13:51 ` [PATCH net-next 1/6] net: stmmac: add stmmac_set_tx_clk_gmii() Russell King (Oracle)
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Russell King (Oracle) @ 2023-09-14 13:50 UTC (permalink / raw)
  To: Alexandre Torgue, Jose Abreu
  Cc: Alexei Starovoitov, bpf, Daniel Borkmann, David S. Miller,
	Emil Renner Berthing, Eric Dumazet, Fabio Estevam, Jakub Kicinski,
	Jesper Dangaard Brouer, John Fastabend, linux-arm-kernel,
	linux-stm32, Maxime Coquelin, netdev, NXP Linux Team, Paolo Abeni,
	Pengutronix Kernel Team, Samin Guo, Sascha Hauer, Shawn Guo

Hi,

There is a common theme throughout several "bsps" in the stmmac driver
which all code up the same thing: for 10M, 100M and 1G, select the
appropriate 2.5MHz, 25MHz, or 125MHz clock.

Rather than having every BSP implement the same thing but slightly
differently, let's provide a single implementation which is passed
the struct clk and the speed, and have that do the speed to clock
rate decode.

Note: only build tested.

v2:
- move dwmac_set_tx_clk_gmii() to stmmac_platform, and rename to have
   stmmac_ prefix.
- add comment body to conversion patches
- use %u for printing speed

 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    | 36 ++++---------
 drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c    | 26 +++-------
 .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 34 +++---------
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c     | 60 ++++++----------------
 .../net/ethernet/stmicro/stmmac/dwmac-starfive.c   | 28 +++-------
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 25 +++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_platform.h  |  1 +
 7 files changed, 74 insertions(+), 136 deletions(-)

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

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

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

end of thread, other threads:[~2023-09-16 20:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 13:50 [PATCH net-next v2 0/6] net: stmmac: add and use library for setting clock Russell King (Oracle)
2023-09-14 13:51 ` [PATCH net-next 1/6] net: stmmac: add stmmac_set_tx_clk_gmii() Russell King (Oracle)
2023-09-14 14:54   ` Serge Semin
2023-09-14 15:12     ` Russell King (Oracle)
2023-09-14 16:06       ` Serge Semin
2023-09-14 13:51 ` [PATCH net-next 2/6] net: stmmac: imx: use stmmac_set_tx_clk_gmii() Russell King (Oracle)
2023-09-14 14:59   ` Serge Semin
2023-09-14 13:51 ` [PATCH net-next 3/6] net: stmmac: intel-plat: " Russell King (Oracle)
2023-09-14 15:00   ` Serge Semin
2023-09-14 13:51 ` [PATCH net-next 4/6] net: stmmac: rk: " Russell King (Oracle)
2023-09-14 14:37   ` Serge Semin
2023-09-14 15:03     ` Russell King (Oracle)
2023-09-14 15:22       ` Serge Semin
2023-09-14 15:27         ` Russell King (Oracle)
2023-09-14 15:30           ` Russell King (Oracle)
2023-09-14 16:01             ` Jose Abreu
2023-09-14 17:05               ` Serge Semin
2023-09-15  8:38                 ` Jose Abreu
2023-09-16 20:17                   ` Serge Semin
2023-09-14 13:51 ` [PATCH net-next 5/6] net: stmmac: starfive: " Russell King (Oracle)
2023-09-14 15:04   ` Serge Semin
2023-09-14 13:51 ` [PATCH net-next 6/6] net: stmmac: qos-eth: " Russell King (Oracle)

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).