lkml.org 
[lkml]   [2023]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/2] net: stmmac: dwmac-starfive: remove unnecessary clk_get_rate()
On Sun, Aug 27, 2023 at 07:33:10PM +0200, Emil Renner Berthing wrote:
> On Sun, 27 Aug 2023 at 15:53, Jisheng Zhang <jszhang@kernel.org> wrote:
> >
> > In starfive_dwmac_fix_mac_speed(), the rate gotten by clk_get_rate()
> > is not necessary, remove the clk_get_rate() calling.
>
> Thanks. I suggested this change during the initial review, but someone
> wanted the code as it is. I must admit I don't understand why, so
> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>

The code in starfive_dwmac_fix_mac_speed() is a repeated pattern amongst
many drivers, and having each platform driver re-implement this is not
sane. Those who know me will know that I have a patch that cleans this
all up - moving basically the guts of this to a library function which
platform drivers can make use of.

It's not like the clock rates are somehow special - they're standard for
10M/100M/1G speeds on a GMII-family interface, and the 10M/100M also
share the clock rates with MII.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

\
 
 \ /
  Last update: 2023-08-27 19:59    [W:0.046 / U:21.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site