net: dsa: mv88e6xxx: add POT operation
Add a pot_clear operation to clear the Priority Override Table and wrap its call into a mv88e6xxx_pot_setup helper. This allows us to get rid of the MV88E6XXX_FLAG_G2_POT flag. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a2a05db8a5
commit
9e907d739c
@@ -311,7 +311,7 @@ static int mv88e6xxx_g2_pot_write(struct mv88e6xxx_chip *chip, int pointer,
|
||||
return mv88e6xxx_g2_update(chip, MV88E6XXX_G2_PRIO_OVERRIDE, val);
|
||||
}
|
||||
|
||||
static int mv88e6xxx_g2_clear_pot(struct mv88e6xxx_chip *chip)
|
||||
int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int i, err;
|
||||
|
||||
@@ -1131,12 +1131,5 @@ int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_POT)) {
|
||||
/* Clear the priority override table. */
|
||||
err = mv88e6xxx_g2_clear_pot(chip);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user