]> Gentwo Git Trees - linux/.git/commit
net: stmmac: qcom-ethqos: add rgmii set/clear functions
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 20 Nov 2025 11:25:22 +0000 (11:25 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 22 Nov 2025 02:13:44 +0000 (18:13 -0800)
commit819212185ae5460e63485ff42ef92a3d1b9ec0c7
tree5e7e4e79a5a1c6f8c994b3108810894388da569d
parentf54bbd390f5fc038cf6ad75432c83b3cedf9bef4
net: stmmac: qcom-ethqos: add rgmii set/clear functions

The driver has a lot of bit manipulation of the RGMII registers. Add
a pair of helpers to set bits and clear bits, converting the various
calls to rgmii_updatel() as appropriate.

Most of the change was done via this sed script:

/rgmii_updatel/ {
N
/,$/N
/mask, / ! {
s|rgmii_updatel\(([^,]*,\s+([^,]*),\s+)\2,\s+|rgmii_setmask(\1|
s|rgmii_updatel\(([^,]*,\s+([^,]*),\s+)0,\s+|rgmii_clrmask(\1|
s|^\s+$||
}
}

and then formatting tweaked where necessary.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/E1vM2mw-0000000FRTo-0End@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c