mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-05-04 17:36:12 +02:00
realtek: dsa: drop legacy table commands
All consumers of legacy table commands have been refactored and use the rtl_table helpers. Drop unused code. rtl839x_exec_tbl2_cmd() cannot be dropped as it is still used in the qos code. Keep it for now. Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/23037 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
1212db4d3f
commit
6ce041be4b
@ -1407,9 +1407,6 @@ struct rtldsa_config {
|
||||
int smi_poll_ctrl;
|
||||
u32 l2_port_aging_out;
|
||||
int l2_tbl_flush_ctrl;
|
||||
void (*exec_tbl0_cmd)(u32 cmd);
|
||||
void (*exec_tbl1_cmd)(u32 cmd);
|
||||
int (*tbl_access_data_0)(int i);
|
||||
int isr_glb_src;
|
||||
int isr_port_link_sts_chg;
|
||||
int imr_port_link_sts_chg;
|
||||
|
||||
@ -205,23 +205,6 @@ static inline int rtl838x_port_iso_ctrl(int p)
|
||||
return RTL838X_PORT_ISO_CTRL(p);
|
||||
}
|
||||
|
||||
static inline void rtl838x_exec_tbl0_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL838X_TBL_ACCESS_CTRL_0);
|
||||
do { } while (sw_r32(RTL838X_TBL_ACCESS_CTRL_0) & BIT(15));
|
||||
}
|
||||
|
||||
static inline void rtl838x_exec_tbl1_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL838X_TBL_ACCESS_CTRL_1);
|
||||
do { } while (sw_r32(RTL838X_TBL_ACCESS_CTRL_1) & BIT(15));
|
||||
}
|
||||
|
||||
static inline int rtl838x_tbl_access_data_0(int i)
|
||||
{
|
||||
return RTL838X_TBL_ACCESS_DATA_0(i);
|
||||
}
|
||||
|
||||
static void rtl838x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
|
||||
{
|
||||
u32 v;
|
||||
@ -1835,9 +1818,6 @@ const struct rtldsa_config rtldsa_838x_cfg = {
|
||||
.set_ageing_time = rtl838x_set_ageing_time,
|
||||
.smi_poll_ctrl = RTL838X_SMI_POLL_CTRL,
|
||||
.l2_tbl_flush_ctrl = RTL838X_L2_TBL_FLUSH_CTRL,
|
||||
.exec_tbl0_cmd = rtl838x_exec_tbl0_cmd,
|
||||
.exec_tbl1_cmd = rtl838x_exec_tbl1_cmd,
|
||||
.tbl_access_data_0 = rtl838x_tbl_access_data_0,
|
||||
.isr_glb_src = RTL838X_ISR_GLB_SRC,
|
||||
.isr_port_link_sts_chg = RTL838X_ISR_PORT_LINK_STS_CHG,
|
||||
.imr_port_link_sts_chg = RTL838X_IMR_PORT_LINK_STS_CHG,
|
||||
|
||||
@ -217,29 +217,12 @@ static inline int rtl839x_port_iso_ctrl(int p)
|
||||
return RTL839X_PORT_ISO_CTRL(p);
|
||||
}
|
||||
|
||||
static inline void rtl839x_exec_tbl0_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL839X_TBL_ACCESS_CTRL_0);
|
||||
do { } while (sw_r32(RTL839X_TBL_ACCESS_CTRL_0) & BIT(16));
|
||||
}
|
||||
|
||||
static inline void rtl839x_exec_tbl1_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL839X_TBL_ACCESS_CTRL_1);
|
||||
do { } while (sw_r32(RTL839X_TBL_ACCESS_CTRL_1) & BIT(16));
|
||||
}
|
||||
|
||||
inline void rtl839x_exec_tbl2_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL839X_TBL_ACCESS_CTRL_2);
|
||||
do { } while (sw_r32(RTL839X_TBL_ACCESS_CTRL_2) & (1 << 9));
|
||||
}
|
||||
|
||||
static inline int rtl839x_tbl_access_data_0(int i)
|
||||
{
|
||||
return RTL839X_TBL_ACCESS_DATA_0(i);
|
||||
}
|
||||
|
||||
static void rtl839x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
|
||||
{
|
||||
u32 u, v, w;
|
||||
@ -1751,9 +1734,6 @@ const struct rtldsa_config rtldsa_839x_cfg = {
|
||||
.set_ageing_time = rtl839x_set_ageing_time,
|
||||
.smi_poll_ctrl = RTL839X_SMI_PORT_POLLING_CTRL,
|
||||
.l2_tbl_flush_ctrl = RTL839X_L2_TBL_FLUSH_CTRL,
|
||||
.exec_tbl0_cmd = rtl839x_exec_tbl0_cmd,
|
||||
.exec_tbl1_cmd = rtl839x_exec_tbl1_cmd,
|
||||
.tbl_access_data_0 = rtl839x_tbl_access_data_0,
|
||||
.isr_glb_src = RTL839X_ISR_GLB_SRC,
|
||||
.isr_port_link_sts_chg = RTL839X_ISR_PORT_LINK_STS_CHG,
|
||||
.imr_port_link_sts_chg = RTL839X_IMR_PORT_LINK_STS_CHG,
|
||||
|
||||
@ -233,23 +233,6 @@ void rtldsa_930x_print_matrix(void)
|
||||
rtl_table_release(r);
|
||||
}
|
||||
|
||||
inline void rtl930x_exec_tbl0_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL930X_TBL_ACCESS_CTRL_0);
|
||||
do { } while (sw_r32(RTL930X_TBL_ACCESS_CTRL_0) & (1 << 17));
|
||||
}
|
||||
|
||||
inline void rtl930x_exec_tbl1_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL930X_TBL_ACCESS_CTRL_1);
|
||||
do { } while (sw_r32(RTL930X_TBL_ACCESS_CTRL_1) & (1 << 17));
|
||||
}
|
||||
|
||||
inline int rtl930x_tbl_access_data_0(int i)
|
||||
{
|
||||
return RTL930X_TBL_ACCESS_DATA_0(i);
|
||||
}
|
||||
|
||||
static inline int rtl930x_l2_port_new_salrn(int p)
|
||||
{
|
||||
return RTL930X_L2_PORT_SALRN(p);
|
||||
@ -2821,9 +2804,6 @@ const struct rtldsa_config rtldsa_930x_cfg = {
|
||||
.set_ageing_time = rtl930x_set_ageing_time,
|
||||
.smi_poll_ctrl = RTL930X_SMI_POLL_CTRL, /* TODO: Difference to RTL9300_SMI_PRVTE_POLLING_CTRL */
|
||||
.l2_tbl_flush_ctrl = RTL930X_L2_TBL_FLUSH_CTRL,
|
||||
.exec_tbl0_cmd = rtl930x_exec_tbl0_cmd,
|
||||
.exec_tbl1_cmd = rtl930x_exec_tbl1_cmd,
|
||||
.tbl_access_data_0 = rtl930x_tbl_access_data_0,
|
||||
.isr_glb_src = RTL930X_ISR_GLB,
|
||||
.isr_port_link_sts_chg = RTL930X_ISR_PORT_LINK_STS_CHG,
|
||||
.imr_port_link_sts_chg = RTL930X_IMR_PORT_LINK_STS_CHG,
|
||||
|
||||
@ -213,23 +213,6 @@ const struct rtldsa_mib_desc rtldsa_931x_mib_desc = {
|
||||
.list = rtldsa_931x_mib_list
|
||||
};
|
||||
|
||||
inline void rtl931x_exec_tbl0_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL931X_TBL_ACCESS_CTRL_0);
|
||||
do { } while (sw_r32(RTL931X_TBL_ACCESS_CTRL_0) & (1 << 20));
|
||||
}
|
||||
|
||||
inline void rtl931x_exec_tbl1_cmd(u32 cmd)
|
||||
{
|
||||
sw_w32(cmd, RTL931X_TBL_ACCESS_CTRL_1);
|
||||
do { } while (sw_r32(RTL931X_TBL_ACCESS_CTRL_1) & (1 << 17));
|
||||
}
|
||||
|
||||
inline int rtl931x_tbl_access_data_0(int i)
|
||||
{
|
||||
return RTL931X_TBL_ACCESS_DATA_0(i);
|
||||
}
|
||||
|
||||
static int
|
||||
rtldsa_931x_vlan_profile_get(int idx, struct rtldsa_vlan_profile *profile)
|
||||
{
|
||||
@ -1962,9 +1945,6 @@ const struct rtldsa_config rtldsa_931x_cfg = {
|
||||
.set_ageing_time = rtl931x_set_ageing_time,
|
||||
.smi_poll_ctrl = RTL931X_SMI_PORT_POLLING_CTRL,
|
||||
.l2_tbl_flush_ctrl = RTL931X_L2_TBL_FLUSH_CTRL,
|
||||
.exec_tbl0_cmd = rtl931x_exec_tbl0_cmd,
|
||||
.exec_tbl1_cmd = rtl931x_exec_tbl1_cmd,
|
||||
.tbl_access_data_0 = rtl931x_tbl_access_data_0,
|
||||
.isr_glb_src = RTL931X_ISR_GLB_SRC,
|
||||
.isr_port_link_sts_chg = RTL931X_ISR_PORT_LINK_STS_CHG,
|
||||
.imr_port_link_sts_chg = RTL931X_IMR_PORT_LINK_STS_CHG,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user