From: <stefanc@marvell.com>
To: <netdev@vger.kernel.org>
Cc: <thomas.petazzoni@bootlin.com>, <davem@davemloft.net>,
<nadavh@marvell.com>, <ymarkman@marvell.com>,
<linux-kernel@vger.kernel.org>, <stefanc@marvell.com>,
<kuba@kernel.org>, <linux@armlinux.org.uk>, <mw@semihalf.com>,
<andrew@lunn.ch>, <rmk+kernel@armlinux.org.uk>,
<atenart@kernel.org>
Subject: [net-next 1/4] net: mvpp2: simplify PPv2 version ID read
Date: Sun, 14 Feb 2021 15:38:34 +0200 [thread overview]
Message-ID: <1613309917-17569-2-git-send-email-stefanc@marvell.com> (raw)
In-Reply-To: <1613309917-17569-1-git-send-email-stefanc@marvell.com>
From: Stefan Chulski <stefanc@marvell.com>
PPv2.1 contain 0 in Version ID register, priv->hw_version check
can be removed.
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6 ++----
1 file 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 e88272f..9127dc2 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);
--
1.9.1
next prev parent reply other threads:[~2021-02-14 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 13:38 [net-next 0/4] net: mvpp2: Minor non functional driver code improvements stefanc
2021-02-14 13:38 ` stefanc [this message]
2021-02-14 13:38 ` [net-next 2/4] net: mvpp2: improve Packet Processor version check stefanc
2021-02-14 13:38 ` [net-next 3/4] net: mvpp2: improve mvpp2_get_sram return stefanc
2021-02-14 13:38 ` [net-next 4/4] net: mvpp2: improve Networking Complex Control register naming stefanc
2021-02-15 20:40 ` [net-next 0/4] net: mvpp2: Minor non functional driver code improvements patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1613309917-17569-2-git-send-email-stefanc@marvell.com \
--to=stefanc@marvell.com \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=thomas.petazzoni@bootlin.com \
--cc=ymarkman@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®