Commit 7358fd80 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by David S. Miller

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.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dabde0da
...@@ -203,21 +203,9 @@ int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip) ...@@ -203,21 +203,9 @@ int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip)
int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip) int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip)
{ {
u16 val;
int err; int err;
/* Set the SWReset bit 15 */ err = mv88e6250_g1_reset(chip);
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);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment