]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: rk: use rk_encode_wm16() for RGMII clocks
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 2 Feb 2026 10:04:21 +0000 (10:04 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 4 Feb 2026 01:59:09 +0000 (17:59 -0800)
commitb9544c128c30037da87dfc2993b1b1795e1c14b5
treeffb7476b9f025b198ec11c2d31d7eba2142dcf56
parent0c8107dbe72043c51886bb973fb5197b6f6641bc
net: stmmac: rk: use rk_encode_wm16() for RGMII clocks

As all of the RGMII clock selection bitfields (gmii_clk_sel) use the
same encoding, parameterise this by providing the bitfield mask in
the BSP private data.

This is the last user of GRF_FIELD_CONST(), so remove that definition
as well.

One additional change is for RK3328 - as only gmac2io supports RGMII,
only initialise the mask for this instance.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vmqn7-00000007VCn-0OZA@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c