[PATCH net-next 2/2] net: stmmac: Add callbacks for DWC xpcs Energy Efficient Ethernet

Sit, Michael Wei Hong michael.wei.hong.sit at intel.com
Mon May 17 04:37:12 PDT 2021



> -----Original Message-----
> From: Russell King <linux at armlinux.org.uk>
> Sent: Monday, 17 May, 2021 6:54 PM
> To: Sit, Michael Wei Hong <michael.wei.hong.sit at intel.com>
> Cc: Jose.Abreu at synopsys.com; andrew at lunn.ch;
> hkallweit1 at gmail.com; kuba at kernel.org;
> netdev at vger.kernel.org; peppe.cavallaro at st.com;
> alexandre.torgue at foss.st.com; davem at davemloft.net;
> mcoquelin.stm32 at gmail.com; Voon, Weifeng
> <weifeng.voon at intel.com>; Ong, Boon Leong
> <boon.leong.ong at intel.com>; Tan, Tee Min
> <tee.min.tan at intel.com>; vee.khee.wong at linux.intel.com;
> Wong, Vee Khee <vee.khee.wong at intel.com>; linux-stm32 at st-
> md-mailman.stormreply.com; linux-arm-
> kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: Re: [PATCH net-next 2/2] net: stmmac: Add callbacks for
> DWC xpcs Energy Efficient Ethernet
> 
> On Mon, May 17, 2021 at 05:43:32PM +0800, Michael Sit Wei Hong
> wrote:
> > Link xpcs callback functions for MAC to configure the xpcs EEE
> feature.
> >
> > The clk_eee frequency is used to calculate the
> MULT_FACT_100NS. This
> > is to adjust the clock tic closer to 100ns.
> >
> > Signed-off-by: Michael Sit Wei Hong
> <michael.wei.hong.sit at intel.com>
> 
> What is the initial state of the EEE configuration before the first
> call to stmmac_ethtool_op_set_eee()? Does it reflect the default
> EEE settings?

The register values before the first call are the default reset values in
the registers. The reset values assumes the clk_eee_i time period is 10ns,
Hence, the reset value is set to 9.
According to the register description,
This value should be programmed such that the
clk_eee_i_time_period * (MULT_FACT_100NS + 1) should be
within 80 ns to 120 ns.

Since we are using a fixed 19.2MHz clk_eee, which is 52ns,
we are setting the value to 1.
> 
> --
> RMK's Patch system:
> https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at
> last!



More information about the linux-arm-kernel mailing list