[PATCH net-next 3/5] net: stmmac: intel-plat: remove eee_usecs_rate and hardware write

Andrew Lunn andrew at lunn.ch
Tue Apr 8 11:57:36 PDT 2025


On Mon, Apr 07, 2025 at 07:59:01PM +0100, Russell King (Oracle) wrote:
> Remove the write to GMAC_1US_TIC_COUNTER for two reasons:
> 
> 1. during initialisation or reinitialisation of the DWMAC core, the
>    core is reset, which sets this register back to its default value.
>    Writing it prior to stmmac_dvr_probe() has no effect.
> 
> 2. Since commit 8efbdbfa9938 ("net: stmmac: Initialize
>    MAC_ONEUS_TIC_COUNTER register"), GMAC4/5 core code will set
>    this register based on the rate of plat->stmmac_clk. This clock
>    is fetched by devm_stmmac_probe_config_dt(), and plat->clk_ptp_rate
>    will be set to its rate profided a "ptp_ref" clock is not provided.
>    In any case, Marek's commit will set the effectual value of this
>    register.
> 
> Therefore, dwmac-intel-plat.c writing GMAC_1US_TIC_COUNTER serves no
> useful purpose and can be removed.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list