]> git.ipfire.org Git - thirdparty/linux.git/commit
net: stmmac: rk: add get_interfaces() implementation
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 12 Jun 2025 15:40:41 +0000 (16:40 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Jun 2025 01:22:58 +0000 (18:22 -0700)
commit1f59e30403a747eb3a4e2d504018b3c4bcc3e54a
tree9a1fa169e9d768e32dae654b53044ebf831ba472
parentd4d4126fc5d23e45e6eb3b47663f1df5a5f486b8
net: stmmac: rk: add get_interfaces() implementation

RK platforms support RGMII and/or RMII depending on the SoC. Detect
whether support for a SoC exists by whether the interface specific
set_to functions have been populated, and set the appropriate bits in
phylink's bitmap of interfaces.

This assumes all dwmac interfaces on a SoC have identical support,
but it should be noted that this is not true for RK3528 which only
supports RGMII on GMAC1. However, the existing code structure
permits RGMII to be configured on GMAC0 without complaint, so
preserve this behaviour even though it is incorrect to avoid
functional change.

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