]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: rk: introduce flags indicating support for RGMII/RMII
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 4 Feb 2026 09:14:17 +0000 (09:14 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 17:20:37 +0000 (09:20 -0800)
commitd323769d64f21865ea2a9132aea0da7c6badc479
tree7eb51746374309c959d7421e55b7e404905d4978
parent7a4cd71fa4514cd85df39b3cf99da8142660cdcd
net: stmmac: rk: introduce flags indicating support for RGMII/RMII

Introduce two boolean flags into struct rk_priv_data indicating
whether RGMII and/or RMII is supported for this instance. Use these
to configure the supported_interfaces mask for phylink, validate the
interface mode. Initialise these from equivalent flags in the
rk_gmac_ops or depending on the presence of the ops->set_to_rgmii and
ops->set_to_mii methods. Finally, make ops->set_to_* optional.

This will allow us to get rid of empty set_to_rmii() methods.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de> #px30,rk3328,rk3568,rk3588
Link: https://patch.msgid.link/E1vnYxl-00000007hol-3XiH@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c