summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx.h')
-rw-r--r--drivers/net/dsa/mv88e6xxx.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
index c67b72af9af1..52ca24efec64 100644
--- a/drivers/net/dsa/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx.h
@@ -350,13 +350,26 @@ enum mv88e6xxx_family {
MV88E6XXX_FAMILY_6352, /* 6172 6176 6240 6352 */
};
-#define MV88E6XXX_FLAGS_FAMILY_6095 0
+enum mv88e6xxx_cap {
+ /* PHY Polling Unit.
+ * See GLOBAL_CONTROL_PPU_ENABLE and GLOBAL_STATUS_PPU_POLLING.
+ */
+ MV88E6XXX_CAP_PPU,
+};
+
+/* Bitmask of capabilities */
+#define MV88E6XXX_FLAG_PPU BIT(MV88E6XXX_CAP_PPU)
-#define MV88E6XXX_FLAGS_FAMILY_6097 0
+#define MV88E6XXX_FLAGS_FAMILY_6095 \
+ MV88E6XXX_FLAG_PPU
+
+#define MV88E6XXX_FLAGS_FAMILY_6097 \
+ MV88E6XXX_FLAG_PPU
#define MV88E6XXX_FLAGS_FAMILY_6165 0
-#define MV88E6XXX_FLAGS_FAMILY_6185 0
+#define MV88E6XXX_FLAGS_FAMILY_6185 \
+ MV88E6XXX_FLAG_PPU
#define MV88E6XXX_FLAGS_FAMILY_6320 0
@@ -418,7 +431,6 @@ struct mv88e6xxx_priv_state {
struct mii_bus *bus;
int sw_addr;
-#ifdef CONFIG_NET_DSA_MV88E6XXX_NEED_PPU
/* Handles automatic disabling and re-enabling of the PHY
* polling unit.
*/
@@ -426,7 +438,6 @@ struct mv88e6xxx_priv_state {
int ppu_disabled;
struct work_struct ppu_work;
struct timer_list ppu_timer;
-#endif
/* This mutex serialises access to the statistics unit.
* Hold this mutex over snapshot + dump sequences.
@@ -489,10 +500,6 @@ int mv88e6xxx_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val);
int mv88e6xxx_phy_read_indirect(struct dsa_switch *ds, int port, int regnum);
int mv88e6xxx_phy_write_indirect(struct dsa_switch *ds, int port, int regnum,
u16 val);
-void mv88e6xxx_ppu_state_init(struct mv88e6xxx_priv_state *ps);
-int mv88e6xxx_phy_read_ppu(struct dsa_switch *ds, int addr, int regnum);
-int mv88e6xxx_phy_write_ppu(struct dsa_switch *ds, int addr,
- int regnum, u16 val);
void mv88e6xxx_get_strings(struct dsa_switch *ds, int port, uint8_t *data);
void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds, int port,
uint64_t *data);