[PATCH net] net: stmmac: dwmac-imx: request high frequency mode

Florian Fainelli f.fainelli at gmail.com
Wed Oct 4 13:00:04 PDT 2023


On 10/4/23 12:54, Shenwei Wang wrote:
> Some i.MX SoCs like the i.mx8mq support adjusting the frequency of the
> DDR, AHB, and AXI buses based on system loading. If the dwmac interface
> in the driver does not request a HIGH frequency, it can significantly
> degrade performance when the system switches to a lower frequency to
> conserve power.
> 
> For example, on an i.MX8MQ EVK board, the throughput dropped to around
> 100Mbit/s on a 1Gbit connection:
> 
>      [ ID] Interval           Transfer     Bitrate
>      [  5]   0.00-10.00  sec   117 MBytes  97.9 Mbits/sec
> 
> However, throughput can return to expected levels after its driver requests
> the high frequency mode. Requesting high frequency in the dwmac driver is
> essential to maintain full throughput when the i.MX SoC adjusts bus speeds
> for power savings.
> 
> Signed-off-by: Mario Castaneda <mario.ignacio.castaneda.lopez at nxp.com>
> Signed-off-by: Shenwei Wang <shenwei.wang at nxp.com>
> Tested-by: Mario Castaneda <mario.ignacio.castaneda.lopez at nxp.com>

I assume that you cannot go full dynamic and adjust the bus frequency 
based upon the negotiated link speed? There may be a need to adjust the 
bus frequency prior to starting any DMA transfers, otherwise dynamic 
frequency scaling of the bus may cause all sorts of issues?

Regardless of the answer:

Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-- 
Florian




More information about the linux-arm-kernel mailing list