Skip to content

net: stmmac: add and use library for setting clock

Russell King (Oracle) bpf linux-arm-kernel netdev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest0 of 6 patches 0 repliesNew
  2. v10 of 6 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

None of the 6 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchSerge Semin
SeriesR-b R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/6] net: stmmac: add and use library for setting clock

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(-)
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!