Reading QREAD and STATUS register
Allow the QREAD and STATUS registers to be read using the PMU
interface.
Change-Id: I7e349a0938404011588c1d5eb82b4a5dbc7c27e4
diff --git a/src/ethosu_pmu.c b/src/ethosu_pmu.c
index df69026..af4e503 100644
--- a/src/ethosu_pmu.c
+++ b/src/ethosu_pmu.c
@@ -285,3 +285,17 @@
cfg.CYCLE_CNT_CFG_STOP = val;
drv->dev->reg->PMCCNTR_CFG.word = cfg.word;
}
+
+uint32_t ETHOSU_PMU_Get_QREAD(struct ethosu_driver *drv)
+{
+ uint32_t val = drv->dev->reg->QREAD.word;
+ LOG_DEBUG("qread=%u", val);
+ return val;
+}
+
+uint32_t ETHOSU_PMU_Get_STATUS(struct ethosu_driver *drv)
+{
+ uint32_t val = drv->dev->reg->STATUS.word;
+ LOG_DEBUG("status=0x%x", val);
+ return val;
+}