mediatek: mt8192: enable NS access for systimer
Enable NS access for all systimers.
Change-Id: I3693997082a1d6f09fef5a79b6cf5a91be46cb8a
diff --git a/plat/mediatek/mt8192/drivers/timer/mt_timer.c b/plat/mediatek/mt8192/drivers/timer/mt_timer.c
index 781f940..0860885 100644
--- a/plat/mediatek/mt8192/drivers/timer/mt_timer.c
+++ b/plat/mediatek/mt8192/drivers/timer/mt_timer.c
@@ -5,6 +5,7 @@
*/
#include <arch_helpers.h>
+#include <lib/mmio.h>
#include <mt_timer.h>
#include <platform_def.h>
@@ -28,3 +29,10 @@
- normal_time_base;
return cval;
}
+
+void mt_systimer_init(void)
+{
+ /* Enable access in NS mode */
+ mmio_write_32(CNTWACR_REG, CNT_WRITE_ACCESS_CTL_MASK);
+ mmio_write_32(CNTRACR_REG, CNT_READ_ACCESS_CTL_MASK);
+}