aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
Diffstat (limited to 'tftf')
-rw-r--r--tftf/framework/timer/timer_framework.c4
-rw-r--r--tftf/tests/framework_validation_tests/test_timer_framework.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/tftf/framework/timer/timer_framework.c b/tftf/framework/timer/timer_framework.c
index d856abe3..49fd07f3 100644
--- a/tftf/framework/timer/timer_framework.c
+++ b/tftf/framework/timer/timer_framework.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -60,7 +60,7 @@ static irq_handler_t timer_handler[PLATFORM_CORE_COUNT];
static inline unsigned long long get_current_time_ms(void)
{
assert(systicks_per_ms);
- return mmio_read_64(SYS_CNT_BASE1 + CNTPCT_LO) / systicks_per_ms;
+ return syscounter_read() / systicks_per_ms;
}
static inline unsigned long long get_current_prog_time(void)
diff --git a/tftf/tests/framework_validation_tests/test_timer_framework.c b/tftf/tests/framework_validation_tests/test_timer_framework.c
index 0bd2985f..47647e78 100644
--- a/tftf/tests/framework_validation_tests/test_timer_framework.c
+++ b/tftf/tests/framework_validation_tests/test_timer_framework.c
@@ -423,7 +423,7 @@ static test_result_t do_stress_test(void)
tftf_send_event(&cpu_ready[core_pos]);
- end_time = mmio_read_64(SYS_CNT_BASE1 + CNTPCT_LO) + read_cntfrq_el0() * 10;
+ end_time = read_cntpct_el0() + read_cntfrq_el0() * 10;
/* Construct the state-id for power down */
ret = tftf_psci_make_composite_state_id(MPIDR_AFFLVL0,
@@ -441,7 +441,7 @@ static test_result_t do_stress_test(void)
}
do {
- current_time = mmio_read_64(SYS_CNT_BASE1 + CNTPCT_LO);
+ current_time = read_cntpct_el0();
if (current_time > end_time)
break;