]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: mvpp2: simplify PPv2 version ID read
authorStefan Chulski <stefanc@marvell.com>
Sun, 14 Feb 2021 13:38:34 +0000 (15:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 01:40:43 +0000 (17:40 -0800)
PPv2.1 contain 0 in Version ID register, priv->hw_version check
can be removed.

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

index e88272f8b600dc5fe93da6c356e6e63783015106..9127dc29d52bbae6c977bc08eecf1e8c60e0318a 100644 (file)
@@ -7469,10 +7469,8 @@ static int mvpp2_probe(struct platform_device *pdev)
                        priv->port_map |= BIT(i);
        }
 
-       if (priv->hw_version != MVPP21) {
-               if (mvpp2_read(priv, MVPP2_VER_ID_REG) == MVPP2_VER_PP23)
-                       priv->hw_version = MVPP23;
-       }
+       if (mvpp2_read(priv, MVPP2_VER_ID_REG) == MVPP2_VER_PP23)
+               priv->hw_version = MVPP23;
 
        /* Init mss lock */
        spin_lock_init(&priv->mss_spinlock);