]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: share the common stat definitions between all drivers
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 8 Sep 2022 16:48:16 +0000 (19:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Sep 2022 09:59:12 +0000 (10:59 +0100)
commit8c6f95929cbdc0ac086d1e15d40409f6142af4e6
treec5d1bf616ac8308cc9c165567a837300d77b1742
parent65e9f26658ade145662dbe1c07b49ca2b46eb46a
net: mscc: ocelot: share the common stat definitions between all drivers

All switch families supported by the ocelot lib (ocelot, felix, seville)
export the same registers so far. But for example felix also has TSN
counters, while the others don't.

To reduce the bloat even further, create an OCELOT_COMMON_STATS() macro
which just lists all stats that are common between switches. The array
elements are still replicated among all of vsc9959_stats_layout,
vsc9953_stats_layout and ocelot_stats_layout.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c
drivers/net/ethernet/mscc/ocelot_vsc7514.c
include/soc/mscc/ocelot.h