#ifndef _MV88E6XXX_CHIP_H
#define _MV88E6XXX_CHIP_H
#include <linux/idr.h>
#include <linux/if_vlan.h>
#include <linux/irq.h>
#include <linux/gpio/consumer.h>
#include <linux/kthread.h>
#include <linux/phy.h>
#include <linux/ptp_clock_kernel.h>
#include <linux/timecounter.h>
#include <net/dsa.h>
#define EDSA_HLEN …
#define MV88E6XXX_N_FID …
#define MV88E6XXX_N_SID …
#define MV88E6XXX_FID_STANDALONE …
#define MV88E6XXX_FID_BRIDGED …
#define MV88E6XXX_MAX_PVT_SWITCHES …
#define MV88E6XXX_MAX_PVT_PORTS …
#define MV88E6XXX_MAX_PVT_ENTRIES …
#define MV88E6XXX_MAX_GPIO …
enum mv88e6xxx_egress_mode { … };
enum mv88e6xxx_egress_direction { … };
enum mv88e6xxx_frame_mode { … };
enum mv88e6xxx_model { … };
enum mv88e6xxx_family { … };
enum mv88e6xxx_edsa_support { … };
struct mv88e6xxx_ops;
struct mv88e6xxx_info { … };
struct mv88e6xxx_atu_entry { … };
struct mv88e6xxx_vtu_entry { … };
struct mv88e6xxx_stu_entry { … };
struct mv88e6xxx_bus_ops;
struct mv88e6xxx_irq_ops;
struct mv88e6xxx_gpio_ops;
struct mv88e6xxx_avb_ops;
struct mv88e6xxx_ptp_ops;
struct mv88e6xxx_pcs_ops;
struct mv88e6xxx_irq { … };
enum { … };
struct mv88e6xxx_port_hwtstamp { … };
enum mv88e6xxx_policy_mapping { … };
enum mv88e6xxx_policy_action { … };
struct mv88e6xxx_policy { … };
struct mv88e6xxx_vlan { … };
struct mv88e6xxx_port { … };
enum mv88e6xxx_region_id { … };
struct mv88e6xxx_region_priv { … };
struct mv88e6xxx_mst { … };
#define STATS_TYPE_PORT …
#define STATS_TYPE_BANK0 …
#define STATS_TYPE_BANK1 …
struct mv88e6xxx_hw_stat { … };
struct mv88e6xxx_chip { … };
struct mv88e6xxx_bus_ops { … };
struct mv88e6xxx_mdio_bus { … };
struct mv88e6xxx_ops { … };
struct mv88e6xxx_irq_ops { … };
struct mv88e6xxx_gpio_ops { … };
struct mv88e6xxx_avb_ops { … };
struct mv88e6xxx_ptp_ops { … };
struct mv88e6xxx_pcs_ops { … };
static inline bool mv88e6xxx_has_stu(struct mv88e6xxx_chip *chip)
{ … }
static inline bool mv88e6xxx_has_pvt(struct mv88e6xxx_chip *chip)
{ … }
static inline bool mv88e6xxx_has_lag(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_num_databases(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_num_macs(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_num_ports(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_max_vid(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_max_sid(struct mv88e6xxx_chip *chip)
{ … }
static inline u16 mv88e6xxx_port_mask(struct mv88e6xxx_chip *chip)
{ … }
static inline unsigned int mv88e6xxx_num_gpio(struct mv88e6xxx_chip *chip)
{ … }
static inline bool mv88e6xxx_is_invalid_port(struct mv88e6xxx_chip *chip, int port)
{ … }
static inline void mv88e6xxx_port_set_mab(struct mv88e6xxx_chip *chip,
int port, bool mab)
{ … }
int mv88e6xxx_read(struct mv88e6xxx_chip *chip, int addr, int reg, u16 *val);
int mv88e6xxx_write(struct mv88e6xxx_chip *chip, int addr, int reg, u16 val);
int mv88e6xxx_wait_mask(struct mv88e6xxx_chip *chip, int addr, int reg,
u16 mask, u16 val);
int mv88e6xxx_wait_bit(struct mv88e6xxx_chip *chip, int addr, int reg,
int bit, int val);
struct mii_bus *mv88e6xxx_default_mdio_bus(struct mv88e6xxx_chip *chip);
static inline void mv88e6xxx_reg_lock(struct mv88e6xxx_chip *chip)
{ … }
static inline void mv88e6xxx_reg_unlock(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6xxx_vtu_walk(struct mv88e6xxx_chip *chip,
int (*cb)(struct mv88e6xxx_chip *chip,
const struct mv88e6xxx_vtu_entry *entry,
void *priv),
void *priv);
int mv88e6xxx_fid_map(struct mv88e6xxx_chip *chip, unsigned long *bitmap);
#endif