net: stmmac: rk: simplify px30_set_rmii_speed()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 12 Jun 2025 15:41:12 +0000 (16:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Jun 2025 01:22:59 +0000 (18:22 -0700)
commitc5cddcdbd2af9c3622820e31a250d7a656e2588e
tree76d40b204874486bfb19fdf464b6347d70ecfc61
parent3930c2cca657bfd03c229a272f21f9b0f2685fad
net: stmmac: rk: simplify px30_set_rmii_speed()

px30_set_rmii_speed() doesn't need to be as verbose as it is - it
merely needs the values for the register and clock rate which depend
on the speed, and then call the appropriate functions. Rewrite the
function to make it so.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/E1uPk3E-004CFl-BZ@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c