aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6352.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2016-05-09 13:22:54 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-09 14:26:12 -0400
commit50484ff4d11c1eca0059f3b3d407ecec0f1b83b0 (patch)
treea989243cfc875498a7ea1d3359139d076abf5c08 /drivers/net/dsa/mv88e6352.c
parentnet: dsa: mv88e6xxx: factorize GLOBAL_MONITOR_CONTROL setup (diff)
downloadlinux-dev-50484ff4d11c1eca0059f3b3d407ecec0f1b83b0.tar.xz
linux-dev-50484ff4d11c1eca0059f3b3d407ecec0f1b83b0.zip
net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL_2 setup
All switch models setup the GLOBAL_CONTROL_2 register with slightly differences. Since the cascade mode is valid even in a single chip setup, factorize such configuration. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/dsa/mv88e6352.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/dsa/mv88e6352.c b/drivers/net/dsa/mv88e6352.c
index e0988706c882..81810ddcc47e 100644
--- a/drivers/net/dsa/mv88e6352.c
+++ b/drivers/net/dsa/mv88e6352.c
@@ -77,16 +77,6 @@ static const char *mv88e6352_drv_probe(struct device *dsa_dev,
ARRAY_SIZE(mv88e6352_table));
}
-static int mv88e6352_setup_global(struct dsa_switch *ds)
-{
- struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
-
- /* Disable remote management for now, and set the switch's
- * DSA device number.
- */
- return mv88e6xxx_reg_write(ps, REG_GLOBAL, 0x1c, ds->index & 0x1f);
-}
-
static int mv88e6352_setup(struct dsa_switch *ds)
{
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
@@ -98,10 +88,6 @@ static int mv88e6352_setup(struct dsa_switch *ds)
if (ret < 0)
return ret;
- ret = mv88e6352_setup_global(ds);
- if (ret < 0)
- return ret;
-
return mv88e6xxx_setup_ports(ds);
}