1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _NET_DSA_RTL83XX_H
4 #define _NET_DSA_RTL83XX_H
10 #define RTL8380_VERSION_A 'A'
11 #define RTL8390_VERSION_A 'A'
12 #define RTL8380_VERSION_B 'B'
14 struct fdb_update_work
{
15 struct work_struct work
;
16 struct net_device
*ndev
;
20 #define MIB_DESC(_size, _offset, _name) {.size = _size, .offset = _offset, .name = _name}
21 struct rtl83xx_mib_desc
{
27 void __init
rtl83xx_setup_qos(struct rtl838x_switch_priv
*priv
);
29 /* RTL838x-specific */
30 u32
rtl838x_hash(struct rtl838x_switch_priv
*priv
, u64 seed
);
31 irqreturn_t
rtl838x_switch_irq(int irq
, void *dev_id
);
32 void rtl8380_get_version(struct rtl838x_switch_priv
*priv
);
33 void rtl838x_vlan_profile_dump(int index
);
34 int rtl83xx_dsa_phy_read(struct dsa_switch
*ds
, int phy_addr
, int phy_reg
);
36 /* RTL839x-specific */
37 u32
rtl839x_hash(struct rtl838x_switch_priv
*priv
, u64 seed
);
38 irqreturn_t
rtl839x_switch_irq(int irq
, void *dev_id
);
39 void rtl8390_get_version(struct rtl838x_switch_priv
*priv
);
40 void rtl839x_vlan_profile_dump(int index
);
41 int rtl83xx_dsa_phy_write(struct dsa_switch
*ds
, int phy_addr
, int phy_reg
, u16 val
);
42 inline void rtl839x_exec_tbl2_cmd(u32 cmd
);
44 #endif /* _NET_DSA_RTL83XX_H */