]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mvpp2: improve Networking Complex Control register naming
authorStefan Chulski <stefanc@marvell.com>
Sun, 14 Feb 2021 13:38:37 +0000 (15:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 01:40:43 +0000 (17:40 -0800)
GENCONF_CTRL0_PORTX naming improved.
Non functional change.

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

index da8715297a9a2b59680ee49f4f3d2c952c4883a0..373ede3a3239f1af8a7c64561497e129bce6b0a5 100644 (file)
 #define     GENCONF_PORT_CTRL1_EN(p)                   BIT(p)
 #define     GENCONF_PORT_CTRL1_RESET(p)                        (BIT(p) << 28)
 #define GENCONF_CTRL0                                  0x1120
-#define     GENCONF_CTRL0_PORT0_RGMII                  BIT(0)
-#define     GENCONF_CTRL0_PORT1_RGMII_MII              BIT(1)
-#define     GENCONF_CTRL0_PORT1_RGMII                  BIT(2)
+#define     GENCONF_CTRL0_PORT2_RGMII                  BIT(0)
+#define     GENCONF_CTRL0_PORT3_RGMII_MII              BIT(1)
+#define     GENCONF_CTRL0_PORT3_RGMII                  BIT(2)
 
 /* Various constants */
 
index bc98f521108ed6a74d97de5d84ad97b7667649c5..d167cfda6e007251a2dbf4616dfa372449cbe5da 100644 (file)
@@ -1494,9 +1494,9 @@ static void mvpp22_gop_init_rgmii(struct mvpp2_port *port)
 
        regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
        if (port->gop_id == 2)
-               val |= GENCONF_CTRL0_PORT0_RGMII;
+               val |= GENCONF_CTRL0_PORT2_RGMII;
        else if (port->gop_id == 3)
-               val |= GENCONF_CTRL0_PORT1_RGMII_MII;
+               val |= GENCONF_CTRL0_PORT3_RGMII_MII;
        regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
 }
 
@@ -1513,9 +1513,9 @@ static void mvpp22_gop_init_sgmii(struct mvpp2_port *port)
        if (port->gop_id > 1) {
                regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
                if (port->gop_id == 2)
-                       val &= ~GENCONF_CTRL0_PORT0_RGMII;
+                       val &= ~GENCONF_CTRL0_PORT2_RGMII;
                else if (port->gop_id == 3)
-                       val &= ~GENCONF_CTRL0_PORT1_RGMII_MII;
+                       val &= ~GENCONF_CTRL0_PORT3_RGMII_MII;
                regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
        }
 }