summaryrefslogtreecommitdiff
path: root/include/soc/mscc/ocelot.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/soc/mscc/ocelot.h')
-rw-r--r--include/soc/mscc/ocelot.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 9b4e6c78d0f4..5c4f57cfa785 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -105,6 +105,13 @@
#define REG_RESERVED_ADDR 0xffffffff
#define REG_RESERVED(reg) REG(reg, REG_RESERVED_ADDR)
+#define OCELOT_STAT_FLAG_END BIT(0)
+
+#define for_each_stat(ocelot, stat) \
+ for ((stat) = ocelot->stats_layout; \
+ !((stat)->flags & OCELOT_STAT_FLAG_END); \
+ (stat)++)
+
enum ocelot_target {
ANA = 1,
QS,
@@ -535,9 +542,12 @@ enum ocelot_ptp_pins {
struct ocelot_stat_layout {
u32 offset;
+ u32 flags;
char name[ETH_GSTRING_LEN];
};
+#define OCELOT_STAT_END { .flags = OCELOT_STAT_FLAG_END }
+
struct ocelot_stats_region {
struct list_head node;
u32 offset;