diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-05-09 20:22:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 21:26:12 +0300 |
commit | 50484ff4d11c1eca0059f3b3d407ecec0f1b83b0 (patch) | |
tree | a989243cfc875498a7ea1d3359139d076abf5c08 /drivers/net/dsa/mv88e6131.c | |
parent | b0745e87943b40734e6c341dcf47a6ec80ee4346 (diff) | |
download | linux-50484ff4d11c1eca0059f3b3d407ecec0f1b83b0.tar.xz |
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 'drivers/net/dsa/mv88e6131.c')
-rw-r--r-- | drivers/net/dsa/mv88e6131.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c index c8e3974163dc..b6ca07b9b938 100644 --- a/drivers/net/dsa/mv88e6131.c +++ b/drivers/net/dsa/mv88e6131.c @@ -61,22 +61,6 @@ static const char *mv88e6131_drv_probe(struct device *dsa_dev, static int mv88e6131_setup_global(struct dsa_switch *ds) { struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); - int ret; - - /* Disable cascade port functionality unless this device - * is used in a cascade configuration, and set the switch's - * DSA device number. - */ - if (ds->dst->pd->nr_chips > 1) - ret = mv88e6xxx_reg_write(ps, REG_GLOBAL, GLOBAL_CONTROL_2, - GLOBAL_CONTROL_2_MULTIPLE_CASCADE | - (ds->index & 0x1f)); - else - ret = mv88e6xxx_reg_write(ps, REG_GLOBAL, GLOBAL_CONTROL_2, - GLOBAL_CONTROL_2_NO_CASCADE | - (ds->index & 0x1f)); - if (ret) - return ret; /* Force the priority of IGMP/MLD snoop frames and ARP frames * to the highest setting. |