diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-07-17 13:03:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-18 11:10:58 -0700 |
commit | 9e907d739cc3caf3afa0af45835cb82ff929207c (patch) | |
tree | a813815384521c6ff258b210f4490050e386953a /drivers/net/dsa/mv88e6xxx/global2.c | |
parent | a2a05db8a5ed5f97d269155508da801646683ad6 (diff) | |
download | talos-op-linux-9e907d739cc3caf3afa0af45835cb82ff929207c.tar.gz talos-op-linux-9e907d739cc3caf3afa0af45835cb82ff929207c.zip |
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>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/global2.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global2.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global2.c b/drivers/net/dsa/mv88e6xxx/global2.c index 6b6ebbd6d322..aaf98e818d0d 100644 --- a/drivers/net/dsa/mv88e6xxx/global2.c +++ b/drivers/net/dsa/mv88e6xxx/global2.c @@ -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; } |