Commit 0a2360c5 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: felix: add definitions for the stream filter counters

TSN stream (802.1Qci, 802.1CB) filters are also accessed through
STAT_VIEW, just like the port registers, but these counters are per
stream, rather than per port. So we don't keep them in
ocelot_port_update_stats().

What we can do, however, is we can create register definitions for them
just like we have for the port counters, and delete the last remaining
user of the SYS_CNT register + a group index (read_gix).
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34df6a8a
...@@ -367,6 +367,10 @@ static const u32 vsc9959_sys_regmap[] = { ...@@ -367,6 +367,10 @@ static const u32 vsc9959_sys_regmap[] = {
REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00043c), REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00043c),
REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000440), REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000440),
REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000444), REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000444),
REG(SYS_COUNT_SF_MATCHING_FRAMES, 0x000800),
REG(SYS_COUNT_SF_NOT_PASSING_FRAMES, 0x000804),
REG(SYS_COUNT_SF_NOT_PASSING_SDU, 0x000808),
REG(SYS_COUNT_SF_RED_FRAMES, 0x00080c),
REG(SYS_RESET_CFG, 0x000e00), REG(SYS_RESET_CFG, 0x000e00),
REG(SYS_SR_ETYPE_CFG, 0x000e04), REG(SYS_SR_ETYPE_CFG, 0x000e04),
REG(SYS_VLAN_ETYPE_CFG, 0x000e08), REG(SYS_VLAN_ETYPE_CFG, 0x000e08),
...@@ -388,7 +392,6 @@ static const u32 vsc9959_sys_regmap[] = { ...@@ -388,7 +392,6 @@ static const u32 vsc9959_sys_regmap[] = {
REG_RESERVED(SYS_MMGT_FAST), REG_RESERVED(SYS_MMGT_FAST),
REG_RESERVED(SYS_EVENTS_DIF), REG_RESERVED(SYS_EVENTS_DIF),
REG_RESERVED(SYS_EVENTS_CORE), REG_RESERVED(SYS_EVENTS_CORE),
REG(SYS_CNT, 0x000000),
REG(SYS_PTP_STATUS, 0x000f14), REG(SYS_PTP_STATUS, 0x000f14),
REG(SYS_PTP_TXSTAMP, 0x000f18), REG(SYS_PTP_TXSTAMP, 0x000f18),
REG(SYS_PTP_NXT, 0x000f1c), REG(SYS_PTP_NXT, 0x000f1c),
...@@ -2577,10 +2580,12 @@ static void vsc9959_psfp_counters_get(struct ocelot *ocelot, u32 index, ...@@ -2577,10 +2580,12 @@ static void vsc9959_psfp_counters_get(struct ocelot *ocelot, u32 index,
SYS_STAT_CFG_STAT_VIEW_M, SYS_STAT_CFG_STAT_VIEW_M,
SYS_STAT_CFG); SYS_STAT_CFG);
counters->match = ocelot_read_gix(ocelot, SYS_CNT, 0x200); counters->match = ocelot_read(ocelot, SYS_COUNT_SF_MATCHING_FRAMES);
counters->not_pass_gate = ocelot_read_gix(ocelot, SYS_CNT, 0x201); counters->not_pass_gate = ocelot_read(ocelot,
counters->not_pass_sdu = ocelot_read_gix(ocelot, SYS_CNT, 0x202); SYS_COUNT_SF_NOT_PASSING_FRAMES);
counters->red = ocelot_read_gix(ocelot, SYS_CNT, 0x203); counters->not_pass_sdu = ocelot_read(ocelot,
SYS_COUNT_SF_NOT_PASSING_SDU);
counters->red = ocelot_read(ocelot, SYS_COUNT_SF_RED_FRAMES);
/* Clear the PSFP counter. */ /* Clear the PSFP counter. */
ocelot_write(ocelot, ocelot_write(ocelot,
......
...@@ -383,7 +383,6 @@ static const u32 vsc9953_sys_regmap[] = { ...@@ -383,7 +383,6 @@ static const u32 vsc9953_sys_regmap[] = {
REG_RESERVED(SYS_MMGT_FAST), REG_RESERVED(SYS_MMGT_FAST),
REG_RESERVED(SYS_EVENTS_DIF), REG_RESERVED(SYS_EVENTS_DIF),
REG_RESERVED(SYS_EVENTS_CORE), REG_RESERVED(SYS_EVENTS_CORE),
REG_RESERVED(SYS_CNT),
REG_RESERVED(SYS_PTP_STATUS), REG_RESERVED(SYS_PTP_STATUS),
REG_RESERVED(SYS_PTP_TXSTAMP), REG_RESERVED(SYS_PTP_TXSTAMP),
REG_RESERVED(SYS_PTP_NXT), REG_RESERVED(SYS_PTP_NXT),
......
...@@ -283,7 +283,6 @@ const u32 vsc7514_sys_regmap[] = { ...@@ -283,7 +283,6 @@ const u32 vsc7514_sys_regmap[] = {
REG(SYS_MMGT_FAST, 0x0006a0), REG(SYS_MMGT_FAST, 0x0006a0),
REG(SYS_EVENTS_DIF, 0x0006a4), REG(SYS_EVENTS_DIF, 0x0006a4),
REG(SYS_EVENTS_CORE, 0x0006b4), REG(SYS_EVENTS_CORE, 0x0006b4),
REG(SYS_CNT, 0x000000),
REG(SYS_PTP_STATUS, 0x0006b8), REG(SYS_PTP_STATUS, 0x0006b8),
REG(SYS_PTP_TXSTAMP, 0x0006bc), REG(SYS_PTP_TXSTAMP, 0x0006bc),
REG(SYS_PTP_NXT, 0x0006c0), REG(SYS_PTP_NXT, 0x0006c0),
......
...@@ -411,6 +411,10 @@ enum ocelot_reg { ...@@ -411,6 +411,10 @@ enum ocelot_reg {
SYS_COUNT_DROP_GREEN_PRIO_5, SYS_COUNT_DROP_GREEN_PRIO_5,
SYS_COUNT_DROP_GREEN_PRIO_6, SYS_COUNT_DROP_GREEN_PRIO_6,
SYS_COUNT_DROP_GREEN_PRIO_7, SYS_COUNT_DROP_GREEN_PRIO_7,
SYS_COUNT_SF_MATCHING_FRAMES,
SYS_COUNT_SF_NOT_PASSING_FRAMES,
SYS_COUNT_SF_NOT_PASSING_SDU,
SYS_COUNT_SF_RED_FRAMES,
SYS_RESET_CFG, SYS_RESET_CFG,
SYS_SR_ETYPE_CFG, SYS_SR_ETYPE_CFG,
SYS_VLAN_ETYPE_CFG, SYS_VLAN_ETYPE_CFG,
...@@ -433,7 +437,6 @@ enum ocelot_reg { ...@@ -433,7 +437,6 @@ enum ocelot_reg {
SYS_MMGT_FAST, SYS_MMGT_FAST,
SYS_EVENTS_DIF, SYS_EVENTS_DIF,
SYS_EVENTS_CORE, SYS_EVENTS_CORE,
SYS_CNT,
SYS_PTP_STATUS, SYS_PTP_STATUS,
SYS_PTP_TXSTAMP, SYS_PTP_TXSTAMP,
SYS_PTP_NXT, SYS_PTP_NXT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment