aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx/chip.c
diff options
context:
space:
mode:
authorGravatar Vivien Didelot <vivien.didelot@savoirfairelinux.com> 2017-05-26 18:03:05 -0400
committerGravatar David S. Miller <davem@davemloft.net> 2017-05-31 12:34:59 -0400
commit1b17aedffb079fa5c05c2118b7f23a1e72e4dd2f (patch)
tree1f1b875feb6c06c5624c43cf183a92a310dd7370 /drivers/net/dsa/mv88e6xxx/chip.c
parentbnxt_en: Fix xmit_more with BQL. (diff)
downloadlinux-1b17aedffb079fa5c05c2118b7f23a1e72e4dd2f.tar.gz
linux-1b17aedffb079fa5c05c2118b7f23a1e72e4dd2f.tar.bz2
linux-1b17aedffb079fa5c05c2118b7f23a1e72e4dd2f.zip
net: dsa: mv88e6xxx: provide a PHY setup helper
Similarly to the VTU, PVT and ATU setup, provide a mv88e6xxx_phy_setup helper which wraps mv88e6xxx_ppu_enable, so that no more PPU-related functions are exposed outside of phy.c. Thus make mv88e6xxx_ppu_enable static. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 742c0eae7fa3..7f5f44f89389 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2034,13 +2034,6 @@ static int mv88e6xxx_g1_setup(struct mv88e6xxx_chip *chip)
u32 upstream_port = dsa_upstream_port(ds);
int err;
- /* Enable the PHY Polling Unit if present, don't discard any packets,
- * and mask all interrupt sources.
- */
- err = mv88e6xxx_ppu_enable(chip);
- if (err)
- return err;
-
if (chip->info->ops->g1_set_cpu_port) {
err = chip->info->ops->g1_set_cpu_port(chip, upstream_port);
if (err)
@@ -2140,6 +2133,10 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
goto unlock;
}
+ err = mv88e6xxx_phy_setup(chip);
+ if (err)
+ goto unlock;
+
err = mv88e6xxx_vtu_setup(chip);
if (err)
goto unlock;