[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190603144112.27713-11-rasmus.villemoes@prevas.dk>
Date: Mon, 3 Jun 2019 14:42:24 +0000
From: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>
CC: Rasmus Villemoes <Rasmus.Villemoes@...vas.se>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next v3 10/10] net: dsa: mv88e6xxx: refactor
mv88e6352_g1_reset
The new mv88e6250_g1_reset() is identical to mv88e6352_g1_reset() except
for the call of mv88e6352_g1_wait_ppu_polling(), so refactor the 6352
version in term of the 6250 one. No functional change.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
---
drivers/net/dsa/mv88e6xxx/global1.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/global1.c b/drivers/net/dsa/mv88e6xxx/global1.c
index fc10b6e495f5..41c0792a2e2b 100644
--- a/drivers/net/dsa/mv88e6xxx/global1.c
+++ b/drivers/net/dsa/mv88e6xxx/global1.c
@@ -203,21 +203,9 @@ int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip)
int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip)
{
- u16 val;
int err;
- /* Set the SWReset bit 15 */
- err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val);
- if (err)
- return err;
-
- val |= MV88E6XXX_G1_CTL1_SW_RESET;
-
- err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val);
- if (err)
- return err;
-
- err = mv88e6xxx_g1_wait_init_ready(chip);
+ err = mv88e6250_g1_reset(chip);
if (err)
return err;
--
2.20.1
Powered by blists - more mailing lists