]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: stmmac: qcom-ethqos: move RGMII_CONFIG2_RSVD_CONFIG15 out
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 27 Mar 2026 08:44:09 +0000 (08:44 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 31 Mar 2026 00:36:45 +0000 (17:36 -0700)
All paths through the switch clear the RGMII_CONFIG2_RSVD_CONFIG15
field. move it out of the switch statement.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Link: https://patch.msgid.link/E1w62nZ-0000000E3Ce-0lyP@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c

index 2751def922dfd8f3806c228aa59b1f53963b6cca..13f4df0a90d7a63b488704793314961c1437ed5f 100644 (file)
@@ -434,10 +434,11 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
                              FIELD_PREP(RGMII_CONFIG_MAX_SPD_PRG_9, 19),
                              RGMII_IO_MACRO_CONFIG);
 
+       rgmii_clrmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15,
+                     RGMII_IO_MACRO_CONFIG2);
+
        switch (speed) {
        case SPEED_1000:
-               rgmii_clrmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15,
-                             RGMII_IO_MACRO_CONFIG2);
                rgmii_setmask(ethqos, RGMII_CONFIG2_RX_PROG_SWAP,
                              RGMII_IO_MACRO_CONFIG2);
 
@@ -462,9 +463,6 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
                break;
 
        case SPEED_100:
-               rgmii_clrmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15,
-                             RGMII_IO_MACRO_CONFIG2);
-
                if (ethqos->has_emac_ge_3)
                        rgmii_setmask(ethqos, RGMII_CONFIG2_RX_PROG_SWAP,
                                      RGMII_IO_MACRO_CONFIG2);
@@ -485,8 +483,6 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos, int speed)
                break;
 
        case SPEED_10:
-               rgmii_clrmask(ethqos, RGMII_CONFIG2_RSVD_CONFIG15,
-                             RGMII_IO_MACRO_CONFIG2);
                if (ethqos->has_emac_ge_3)
                        rgmii_setmask(ethqos, RGMII_CONFIG2_RX_PROG_SWAP,
                                      RGMII_IO_MACRO_CONFIG2);