Commit 12af94b2 authored by Pawel Dembicki's avatar Pawel Dembicki Committed by Jakub Kicinski

net: dsa: vsc73xx: use macros for rgmii recognition

It's preparation for future use. At this moment, the RGMII port is used
only for a connection to the MAC interface, but in the future, someone
could connect a PHY to it. Using the "phy_interface_mode_is_rgmii" macro
allows for the proper recognition of all RGMII modes.
Suggested-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20240417205048.3542839-4-paweldembicki@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 21fc3416
...@@ -810,7 +810,7 @@ static void vsc73xx_mac_link_up(struct phylink_config *config, ...@@ -810,7 +810,7 @@ static void vsc73xx_mac_link_up(struct phylink_config *config,
else else
val = VSC73XX_MAC_CFG_TX_IPG_100_10M; val = VSC73XX_MAC_CFG_TX_IPG_100_10M;
if (interface == PHY_INTERFACE_MODE_RGMII) if (phy_interface_mode_is_rgmii(interface))
val |= VSC73XX_MAC_CFG_CLK_SEL_1000M; val |= VSC73XX_MAC_CFG_CLK_SEL_1000M;
else else
val |= VSC73XX_MAC_CFG_CLK_SEL_EXT; val |= VSC73XX_MAC_CFG_CLK_SEL_EXT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment