summaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/avf.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-06-17 20:25:54 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-05-19 19:05:56 +0000
commit2e212c2c727b1228f4a5c9b785a42c4a58c3f2d5 (patch)
tree3d9d13626b3b9850f9734a7e1ee1cdf5963f19f8 /src/plugins/avf/avf.h
parentfa3bd303779957c5af3350b1a51ceb8158e05282 (diff)
avf: improve elogs
Change-Id: I6221e1a5924223865b3caf53590d3668965b564c Type: fix Fixes: b4ff07a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/avf/avf.h')
-rw-r--r--src/plugins/avf/avf.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/avf/avf.h b/src/plugins/avf/avf.h
index dbcdcd249af..a1da4c8866b 100644
--- a/src/plugins/avf/avf.h
+++ b/src/plugins/avf/avf.h
@@ -370,6 +370,13 @@ avf_get_device (u32 dev_instance)
return pool_elt_at_index (avf_main.devices, dev_instance)[0];
}
+/* elog.c */
+void avf_elog_init ();
+void avf_elog_reg (avf_device_t *ad, u32 addr, u32 val, int is_read);
+void avf_elog_aq_enq_req (avf_device_t *ad, avf_aq_desc_t *d);
+void avf_elog_aq_enq_resp (avf_device_t *ad, avf_aq_desc_t *d);
+void avf_elog_arq_desc (avf_device_t *ad, avf_aq_desc_t *d);
+
static inline u32
avf_get_u32 (void *start, int offset)
{
@@ -413,13 +420,20 @@ avf_set_u32 (void *start, int offset, u32 value)
static inline void
avf_reg_write (avf_device_t * ad, u32 addr, u32 val)
{
+ if (ad->flags & AVF_DEVICE_F_ELOG)
+ avf_elog_reg (ad, addr, val, 0);
*(volatile u32 *) ((u8 *) ad->bar0 + addr) = val;
}
static inline u32
avf_reg_read (avf_device_t * ad, u32 addr)
{
- return *(volatile u32 *) (ad->bar0 + addr);
+ u32 val = *(volatile u32 *) (ad->bar0 + addr);
+
+ if (ad->flags & AVF_DEVICE_F_ELOG)
+ avf_elog_reg (ad, addr, val, 1);
+
+ return val;
}
static inline void