priv->r->set_static_move_action(i, true);
}
- if (priv->family_id == RTL8380_FAMILY_ID)
- rtl838x_print_matrix();
- else
- rtl839x_print_matrix();
-
+ priv->r->print_matrix();
rtldsa_83xx_init_stats(priv);
rtldsa_init_counters(priv);
if (priv->family_id == RTL9310_FAMILY_ID)
rtldsa_931x_config_phy_ability_source(priv);
- if (priv->family_id == RTL9300_FAMILY_ID)
- rtl930x_print_matrix();
- else if (priv->family_id == RTL9310_FAMILY_ID)
- rtl931x_print_matrix();
+ priv->r->print_matrix();
/* TODO: Initialize statistics */
rtldsa_init_counters(priv);
},
};
-void rtl838x_print_matrix(void)
+void rtldsa_838x_print_matrix(void)
{
unsigned volatile int *ptr8;
.l2_port_new_salrn = rtl838x_l2_port_new_salrn,
.l2_port_new_sa_fwd = rtl838x_l2_port_new_sa_fwd,
.get_mirror_config = rtldsa_838x_get_mirror_config,
+ .print_matrix = rtldsa_838x_print_matrix,
.read_l2_entry_using_hash = rtl838x_read_l2_entry_using_hash,
.write_l2_entry_using_hash = rtl838x_write_l2_entry_using_hash,
.read_cam = rtl838x_read_cam,
const struct flow_action_entry *act, bool ingress);
int (*port_rate_police_del)(struct dsa_switch *ds, int port, struct flow_cls_offload *cls,
bool ingress);
+ void (*print_matrix)(void);
u64 (*read_l2_entry_using_hash)(u32 hash, u32 position, struct rtl838x_l2_entry *e);
void (*write_l2_entry_using_hash)(u32 hash, u32 pos, struct rtl838x_l2_entry *e);
u64 (*read_cam)(int idx, struct rtl838x_l2_entry *e);
},
};
-void rtl839x_print_matrix(void)
+void rtldsa_839x_print_matrix(void)
{
volatile u64 *ptr9;
.l2_port_new_salrn = rtl839x_l2_port_new_salrn,
.l2_port_new_sa_fwd = rtl839x_l2_port_new_sa_fwd,
.get_mirror_config = rtldsa_839x_get_mirror_config,
+ .print_matrix = rtldsa_839x_print_matrix,
.read_l2_entry_using_hash = rtl839x_read_l2_entry_using_hash,
.write_l2_entry_using_hash = rtl839x_write_l2_entry_using_hash,
.read_cam = rtl839x_read_cam,
u32 rtl838x_hash(struct rtl838x_switch_priv *priv, u64 seed);
irqreturn_t rtl838x_switch_irq(int irq, void *dev_id);
void rtl838x_vlan_profile_dump(int index);
-void rtl838x_print_matrix(void);
+void rtldsa_838x_print_matrix(void);
/* RTL839x-specific */
u32 rtl839x_hash(struct rtl838x_switch_priv *priv, u64 seed);
irqreturn_t rtl839x_switch_irq(int irq, void *dev_id);
void rtl839x_vlan_profile_dump(int index);
void rtl839x_exec_tbl2_cmd(u32 cmd);
-void rtl839x_print_matrix(void);
+void rtldsa_839x_print_matrix(void);
/* RTL930x-specific */
u32 rtl930x_hash(struct rtl838x_switch_priv *priv, u64 seed);
irqreturn_t rtldsa_930x_switch_irq(int irq, void *dev_id);
irqreturn_t rtl839x_switch_irq(int irq, void *dev_id);
void rtl930x_vlan_profile_dump(int index);
-void rtl930x_print_matrix(void);
+void rtldsa_930x_print_matrix(void);
/* RTL931x-specific */
irqreturn_t rtl931x_switch_irq(int irq, void *dev_id);
-void rtl931x_print_matrix(void);
+void rtldsa_931x_print_matrix(void);
void rtldsa_931x_config_phy_ability_source(struct rtl838x_switch_priv *priv);
int rtl83xx_lag_add(struct dsa_switch *ds, int group, int port, struct netdev_lag_upper_info *info);
void rtl9300_dump_debug(void);
void rtl930x_pie_rule_dump_raw(u32 r[]);
-void rtl931x_print_matrix(void);
-
extern const struct dsa_switch_ops rtldsa_83xx_switch_ops;
extern const struct dsa_switch_ops rtldsa_93xx_switch_ops;
},
};
-void rtl930x_print_matrix(void)
+void rtldsa_930x_print_matrix(void)
{
struct table_reg *r = rtl_table_get(RTL9300_TBL_0, 6);
}
pr_debug("# %08x %08x %08x %08x %08x\n",
sw_r32(r), sw_r32(r + 4), sw_r32(r + 8), sw_r32(r + 12), sw_r32(r + 16));
- rtl930x_print_matrix();
+ rtldsa_930x_print_matrix();
pr_debug("RTL930X_L2_PORT_SABLK_CTRL: %08x, RTL930X_L2_PORT_DABLK_CTRL %08x\n",
sw_r32(RTL930X_L2_PORT_SABLK_CTRL), sw_r32(RTL930X_L2_PORT_DABLK_CTRL)
.get_mirror_config = rtldsa_930x_get_mirror_config,
.port_rate_police_add = rtldsa_930x_port_rate_police_add,
.port_rate_police_del = rtldsa_930x_port_rate_police_del,
+ .print_matrix = rtldsa_930x_print_matrix,
.read_l2_entry_using_hash = rtl930x_read_l2_entry_using_hash,
.write_l2_entry_using_hash = rtl930x_write_l2_entry_using_hash,
.read_cam = rtl930x_read_cam,
return IRQ_HANDLED;
}
-void rtl931x_print_matrix(void)
+void rtldsa_931x_print_matrix(void)
{
struct table_reg *r = rtl_table_get(RTL9310_TBL_2, 1);
.get_mirror_config = rtldsa_931x_get_mirror_config,
.port_rate_police_add = rtldsa_931x_port_rate_police_add,
.port_rate_police_del = rtldsa_931x_port_rate_police_del,
+ .print_matrix = rtldsa_931x_print_matrix,
.read_l2_entry_using_hash = rtl931x_read_l2_entry_using_hash,
.write_l2_entry_using_hash = rtl931x_write_l2_entry_using_hash,
.read_cam = rtl931x_read_cam,