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

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


On Mon, Apr 07, 2025 at 07:58:56PM +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 created by the same code which initialises plat->eee_usecs_rate,
>    which is also created to run at this same rate. Since Marek's
>    commit, this will set this register appropriately using the
>    rate of this clock.
> 
> Therefore, dwmac-intel.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