diff options
author | Andrew Lunn <andrew@lunn.ch> | 2017-02-04 20:15:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-07 10:48:06 -0500 |
commit | a23b296198cbf2b78101e7e745f9c45663c3f82e (patch) | |
tree | abfe780c8680390d685c1bbb255bf9df6fe0c8e2 /drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | |
parent | cf3e80df13e534eb34a85835d5357c78d8689199 (diff) |
net: dsa: mv88e6xxx: Refactor remaining port setup
Move the remaining port configuration code which varies per device
into port.c, using ops were necessary. This makes
mv88e6xxx_6185_family() and mv88e6xxx_6095_family() unused, so remove
them.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/mv88e6xxx.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h index c1d43ee11842..8a21800374f3 100644 --- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h +++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h @@ -168,6 +168,7 @@ #define PORT_CONTROL_2_FORWARD_UNKNOWN BIT(6) #define PORT_CONTROL_2_EGRESS_MONITOR BIT(5) #define PORT_CONTROL_2_INGRESS_MONITOR BIT(4) +#define PORT_CONTROL_2_UPSTREAM_MASK 0x0f #define PORT_RATE_CONTROL 0x09 #define PORT_RATE_CONTROL_2 0x0a #define PORT_ASSOC_VECTOR 0x0b @@ -854,6 +855,12 @@ struct mv88e6xxx_ops { int (*port_set_cmode)(struct mv88e6xxx_chip *chip, int port, phy_interface_t mode); + /* Some devices have a per port register indicating what is + * the upstream port this port should forward to. + */ + int (*port_set_upstream_port)(struct mv88e6xxx_chip *chip, int port, + int upstream_port); + /* Snapshot the statistics for a port. The statistics can then * be read back a leisure but still with a consistent view. */ |