]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: dsa: drop legacy table commands 23037/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Tue, 21 Apr 2026 17:36:07 +0000 (19:36 +0200)
committerRobert Marko <robimarko@gmail.com>
Wed, 22 Apr 2026 14:59:29 +0000 (16:59 +0200)
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>
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl-otto.h
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl930x.c
target/linux/realtek/files-6.18/drivers/net/dsa/rtl83xx/rtl931x.c

index 837341d41f61dd9cb7ec06080c9760c3d9585a56..460f542a6ed21a23f4f63ebb2377413292bdb8be 100644 (file)
@@ -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;
index e32525f9aaf9ae234e1faf60c907e980ee30b751..f043b0c57794b879df96a42deed1f5dc1bb0c2ff 100644 (file)
@@ -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,
index 828d7a004b813b658dfd174a6665d694bc11c722..6af0422abf0849ae581062754d7f7b6a1c5c103b 100644 (file)
@@ -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,
index b166e7daeffc4020e19955a3d671a2b7437c396e..505fd7200d975d17b610e66fd57375c53bc31706 100644 (file)
@@ -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,
index be75cea4d890e6fd5157bcde1ceeca5806418147..b116f1e29cec2de6e8609e3eac33b00242f04ab1 100644 (file)
@@ -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,