]> git.ipfire.org Git - thirdparty/linux.git/commit
net: stmmac: rk: add struct for programming register based speeds
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 12 Jun 2025 15:40:51 +0000 (16:40 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Jun 2025 01:22:58 +0000 (18:22 -0700)
commit3de607d13b6bd7fd85759d085b6996112bf6cfe2
tree94aba672c26fe251a613f54bfea1ada0281f2b03
parente6e9e837d312ee872892d9207c58763f0838a36c
net: stmmac: rk: add struct for programming register based speeds

There is a common pattern in the driver where many SoCs need to write a
single register with a value dependent on the interface mode and speed.
Rather than having a lot of repeated code, add some common functions
and a struct to contain the values to be written to a register to
select the RGMII and RMII speeds.

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