timer/trustzone: set CPU frequency in tee environment

In an implementation that supports the ARM Security Extensions, only
software executing in a Secure PL1 mode can write to CNTFRQ

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2023-08-04 10:18:50 +08:00 committed by Petro Karashchenko
parent 09a81017b8
commit 90fba56d2e

View File

@ -26,17 +26,11 @@
#include "arm_timer.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define CYCLES_PER_SEC 62500000
/****************************************************************************
* Public Functions
****************************************************************************/
void up_timer_initialize(void)
{
up_alarm_set_lowerhalf(arm_timer_initialize(CYCLES_PER_SEC));
up_alarm_set_lowerhalf(arm_timer_initialize(0));
}