Skip to content

RFC net: stmmac: cleanup transmit clock setting

Russell King (Oracle) imx linux-arm-kernel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 7 patches 1 replyIn review

Patches in v1 No applies recorded yet

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

Reviews trailers per patch

PatchThierry Reding
SeriesT-b R-b R-b R-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 v1 thread

Cover letter [PATCH RFC net-next 0/7] net: stmmac: cleanup transmit clock setting

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.
Patches 3 through 7 convert the easy-to-convert platforms to use this new infrastructure.

 .../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c    | 10 +----
 drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c    |  5 ++-
 .../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 24 ++----------
 drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c    | 22 ++---------
 .../net/ethernet/stmicro/stmmac/dwmac-starfive.c   | 26 ++-----------
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |  2 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 43 ++++++++++++++++++++++
 include/linux/stmmac.h                             |  4 ++
 8 files changed, 65 insertions(+), 71 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!