#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/iopoll.h>
#include <linux/platform_data/microchip-ksz.h>
#include <linux/phy.h>
#include <linux/if_bridge.h>
#include <linux/if_vlan.h>
#include <net/dsa.h>
#include <net/switchdev.h>
#include "ksz9477_reg.h"
#include "ksz_common.h"
#include "ksz9477.h"
static void ksz_cfg(struct ksz_device *dev, u32 addr, u8 bits, bool set)
{ … }
static void ksz_port_cfg(struct ksz_device *dev, int port, int offset, u8 bits,
bool set)
{ … }
static void ksz9477_cfg32(struct ksz_device *dev, u32 addr, u32 bits, bool set)
{ … }
static void ksz9477_port_cfg32(struct ksz_device *dev, int port, int offset,
u32 bits, bool set)
{ … }
int ksz9477_change_mtu(struct ksz_device *dev, int port, int mtu)
{ … }
static int ksz9477_handle_wake_reason(struct ksz_device *dev, int port)
{ … }
void ksz9477_get_wol(struct ksz_device *dev, int port,
struct ethtool_wolinfo *wol)
{ … }
int ksz9477_set_wol(struct ksz_device *dev, int port,
struct ethtool_wolinfo *wol)
{ … }
void ksz9477_wol_pre_shutdown(struct ksz_device *dev, bool *wol_enabled)
{ … }
static int ksz9477_wait_vlan_ctrl_ready(struct ksz_device *dev)
{ … }
static int ksz9477_get_vlan_table(struct ksz_device *dev, u16 vid,
u32 *vlan_table)
{ … }
static int ksz9477_set_vlan_table(struct ksz_device *dev, u16 vid,
u32 *vlan_table)
{ … }
static void ksz9477_read_table(struct ksz_device *dev, u32 *table)
{ … }
static void ksz9477_write_table(struct ksz_device *dev, u32 *table)
{ … }
static int ksz9477_wait_alu_ready(struct ksz_device *dev)
{ … }
static int ksz9477_wait_alu_sta_ready(struct ksz_device *dev)
{ … }
int ksz9477_reset_switch(struct ksz_device *dev)
{ … }
void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, u64 *cnt)
{ … }
void ksz9477_r_mib_pkt(struct ksz_device *dev, int port, u16 addr,
u64 *dropped, u64 *cnt)
{ … }
void ksz9477_freeze_mib(struct ksz_device *dev, int port, bool freeze)
{ … }
int ksz9477_errata_monitor(struct ksz_device *dev, int port,
u64 tx_late_col)
{ … }
void ksz9477_port_init_cnt(struct ksz_device *dev, int port)
{ … }
static void ksz9477_r_phy_quirks(struct ksz_device *dev, u16 addr, u16 reg,
u16 *data)
{ … }
int ksz9477_r_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 *data)
{ … }
int ksz9477_w_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 val)
{ … }
void ksz9477_cfg_port_member(struct ksz_device *dev, int port, u8 member)
{ … }
void ksz9477_flush_dyn_mac_table(struct ksz_device *dev, int port)
{ … }
int ksz9477_port_vlan_filtering(struct ksz_device *dev, int port,
bool flag, struct netlink_ext_ack *extack)
{ … }
int ksz9477_port_vlan_add(struct ksz_device *dev, int port,
const struct switchdev_obj_port_vlan *vlan,
struct netlink_ext_ack *extack)
{ … }
int ksz9477_port_vlan_del(struct ksz_device *dev, int port,
const struct switchdev_obj_port_vlan *vlan)
{ … }
int ksz9477_fdb_add(struct ksz_device *dev, int port,
const unsigned char *addr, u16 vid, struct dsa_db db)
{ … }
int ksz9477_fdb_del(struct ksz_device *dev, int port,
const unsigned char *addr, u16 vid, struct dsa_db db)
{ … }
static void ksz9477_convert_alu(struct alu_struct *alu, u32 *alu_table)
{ … }
int ksz9477_fdb_dump(struct ksz_device *dev, int port,
dsa_fdb_dump_cb_t *cb, void *data)
{ … }
int ksz9477_mdb_add(struct ksz_device *dev, int port,
const struct switchdev_obj_port_mdb *mdb, struct dsa_db db)
{ … }
int ksz9477_mdb_del(struct ksz_device *dev, int port,
const struct switchdev_obj_port_mdb *mdb, struct dsa_db db)
{ … }
int ksz9477_port_mirror_add(struct ksz_device *dev, int port,
struct dsa_mall_mirror_tc_entry *mirror,
bool ingress, struct netlink_ext_ack *extack)
{ … }
void ksz9477_port_mirror_del(struct ksz_device *dev, int port,
struct dsa_mall_mirror_tc_entry *mirror)
{ … }
static phy_interface_t ksz9477_get_interface(struct ksz_device *dev, int port)
{ … }
void ksz9477_get_caps(struct ksz_device *dev, int port,
struct phylink_config *config)
{ … }
int ksz9477_set_ageing_time(struct ksz_device *dev, unsigned int msecs)
{ … }
void ksz9477_port_queue_split(struct ksz_device *dev, int port)
{ … }
void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
{ … }
void ksz9477_config_cpu_port(struct dsa_switch *ds)
{ … }
int ksz9477_enable_stp_addr(struct ksz_device *dev)
{ … }
int ksz9477_setup(struct dsa_switch *ds)
{ … }
u32 ksz9477_get_port_addr(int port, int offset)
{ … }
int ksz9477_tc_cbs_set_cinc(struct ksz_device *dev, int port, u32 val)
{ … }
#define KSZ9477_SUPPORTED_HSR_FEATURES …
void ksz9477_hsr_join(struct dsa_switch *ds, int port, struct net_device *hsr)
{ … }
void ksz9477_hsr_leave(struct dsa_switch *ds, int port, struct net_device *hsr)
{ … }
int ksz9477_switch_init(struct ksz_device *dev)
{ … }
void ksz9477_switch_exit(struct ksz_device *dev)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;