Add BCM_VK_QSTATS Kconfig option to allow for enabling debug VK
queue statistics.
These statistics keep track of max, abs_max, and average for the
messages queues.
Co-developed-by: Desmond Yan <desmond.yan@xxxxxxxxxxxx>
Signed-off-by: Desmond Yan <desmond.yan@xxxxxxxxxxxx>
Signed-off-by: Scott Branden <scott.branden@xxxxxxxxxxxx>
---
+#if defined(CONFIG_BCM_VK_QSTATS)
+ /* clear qstats */
+ for (i = 0; i < VK_MSGQ_MAX_NR; i++) {
+ memset(&vk->to_v_msg_chan.qstats[i].qcnts, 0,
+ sizeof(vk->to_v_msg_chan.qstats[i].qcnts));
+ memset(&vk->to_h_msg_chan.qstats[i].qcnts, 0,
+ sizeof(vk->to_h_msg_chan.qstats[i].qcnts));
+ }
+#endif
/* clear 4096 bits of bitmap */
bitmap_clear(vk->bmap, 0, VK_MSG_ID_BITMAP_SIZE);