[PATCH RFC net-next 0/7] net: stmmac: cleanup transmit clock setting
Thierry Reding
thierry.reding at gmail.com
Tue Feb 25 12:30:52 PST 2025
On Tue, Feb 18, 2025 at 11:14:39AM +0000, Russell King (Oracle) wrote:
> 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(-)
Seems to work fine on Jetson TX2, so patches 1-3 are:
Tested-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250225/1b1685c4/attachment.sig>
More information about the linux-arm-kernel
mailing list