]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/dsa/mv88e6xxx.h
Merge remote-tracking branch 'sound-current/for-linus'
[karo-tx-linux.git] / drivers / net / dsa / mv88e6xxx.h
index 430de4fa1fec76be5757f38353a55e31ebc10630..fb9a8739712f3cfc8a4f1736d594d221dedeeb89 100644 (file)
@@ -60,6 +60,8 @@
 #define PORT_PCS_CTRL_UNFORCED         0x03
 #define PORT_PAUSE_CTRL                0x02
 #define PORT_SWITCH_ID         0x03
+#define PORT_SWITCH_ID_PROD_NUM_MASK   0xfff0
+#define PORT_SWITCH_ID_REV_MASK                0x000f
 #define PORT_SWITCH_ID_6031    0x0310
 #define PORT_SWITCH_ID_6035    0x0350
 #define PORT_SWITCH_ID_6046    0x0480
 #define PORT_RATE_CONTROL      0x09
 #define PORT_RATE_CONTROL_2    0x0a
 #define PORT_ASSOC_VECTOR      0x0b
+#define PORT_ASSOC_VECTOR_HOLD_AT_1            BIT(15)
+#define PORT_ASSOC_VECTOR_INT_AGE_OUT          BIT(14)
+#define PORT_ASSOC_VECTOR_LOCKED_PORT          BIT(13)
+#define PORT_ASSOC_VECTOR_IGNORE_WRONG         BIT(12)
+#define PORT_ASSOC_VECTOR_REFRESH_LOCKED       BIT(11)
 #define PORT_ATU_CONTROL       0x0c
 #define PORT_PRI_OVERRIDE      0x0d
 #define PORT_ETH_TYPE          0x0f
 #define GLOBAL2_QOS_WEIGHT     0x1c
 #define GLOBAL2_MISC           0x1d
 
+struct mv88e6xxx_switch_id {
+       u16 id;
+       char *name;
+};
+
 struct mv88e6xxx_atu_entry {
        u16     fid;
        u8      state;
@@ -406,8 +418,6 @@ struct mv88e6xxx_priv_state {
        u8 port_state[DSA_MAX_PORTS];
 
        struct work_struct bridge_work;
-
-       struct dentry *dbgfs;
 };
 
 struct mv88e6xxx_hw_stat {
@@ -417,13 +427,13 @@ struct mv88e6xxx_hw_stat {
 };
 
 int mv88e6xxx_switch_reset(struct dsa_switch *ds, bool ppu_active);
+char *mv88e6xxx_lookup_name(struct device *host_dev, int sw_addr,
+                           const struct mv88e6xxx_switch_id *table,
+                           unsigned int num);
 int mv88e6xxx_setup_ports(struct dsa_switch *ds);
 int mv88e6xxx_setup_common(struct dsa_switch *ds);
 int mv88e6xxx_setup_global(struct dsa_switch *ds);
-int __mv88e6xxx_reg_read(struct mii_bus *bus, int sw_addr, int addr, int reg);
 int mv88e6xxx_reg_read(struct dsa_switch *ds, int addr, int reg);
-int __mv88e6xxx_reg_write(struct mii_bus *bus, int sw_addr, int addr,
-                         int reg, u16 val);
 int mv88e6xxx_reg_write(struct dsa_switch *ds, int addr, int reg, u16 val);
 int mv88e6xxx_set_addr_direct(struct dsa_switch *ds, u8 *addr);
 int mv88e6xxx_set_addr_indirect(struct dsa_switch *ds, u8 *addr);
@@ -459,11 +469,15 @@ int mv88e6xxx_get_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e);
 int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
                      struct phy_device *phydev, struct ethtool_eee *e);
 int mv88e6xxx_port_stp_update(struct dsa_switch *ds, int port, u8 state);
+int mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
+                               const struct switchdev_obj_port_vlan *vlan,
+                               struct switchdev_trans *trans);
+int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
+                           const struct switchdev_obj_port_vlan *vlan,
+                           struct switchdev_trans *trans);
+int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
+                           const struct switchdev_obj_port_vlan *vlan);
 int mv88e6xxx_port_pvid_get(struct dsa_switch *ds, int port, u16 *vid);
-int mv88e6xxx_port_pvid_set(struct dsa_switch *ds, int port, u16 vid);
-int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, u16 vid,
-                           bool untagged);
-int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port, u16 vid);
 int mv88e6xxx_vlan_getnext(struct dsa_switch *ds, u16 *vid,
                           unsigned long *ports, unsigned long *untagged);
 int mv88e6xxx_port_fdb_prepare(struct dsa_switch *ds, int port,