diff options
author | Stefan Chulski <stefanc@marvell.com> | 2021-02-14 15:38:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-14 17:40:43 -0800 |
commit | 8b986866b252c272a93f734ab8f1e577c7977677 (patch) | |
tree | 6972796aabd349ca7b381f0af682c756ac347f29 /drivers/net | |
parent | 7f6334f7ef69cf5098b9d28f863a3014b43f59c6 (diff) |
net: mvpp2: simplify PPv2 version ID read
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index e88272f8b600..9127dc29d52b 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -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); |