From 7f2d23d9d790df90021de6c5165ef10fe5cc5590 Mon Sep 17 00:00:00 2001 From: Manoj Kumar Date: Thu, 20 May 2021 16:23:22 +0100 Subject: [PATCH] fix(morello): initialise CNTFRQ in Non Secure CNTBaseN Morello exhibits the behavior similar to Juno wherein CNTBaseN.CNTFRQ can be written but does not reflect the value of the CNTFRQ register in CNTCTLBase frame. This doesn't follow ARM ARM in that the value updated in CNTCTLBase.CNTFRQ is not reflected in CNTBaseN.CNTFRQ. Hence enable the workaround (applied to Juno) for Morello that updates the CNTFRQ register in the Non Secure CNTBaseN frame. Change-Id: Iabe53bf3c25152052107e08321323e4bde5fbef4 Signed-off-by: Manoj Kumar --- plat/arm/common/arm_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/arm/common/arm_common.c b/plat/arm/common/arm_common.c index 7d9fd6c72..946b7329f 100644 --- a/plat/arm/common/arm_common.c +++ b/plat/arm/common/arm_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -151,10 +151,10 @@ void arm_configure_sys_timer(void) */ mmio_write_32(ARM_SYS_TIMCTL_BASE + CNTCTLBASE_CNTFRQ, freq_val); -#if defined(PLAT_juno) || defined(PLAT_n1sdp) +#if defined(PLAT_juno) || defined(PLAT_n1sdp) || defined(PLAT_morello) /* * Initialize CNTFRQ register in Non-secure CNTBase frame. - * This is only required for Juno and N1SDP, because they do not + * This is required for Juno, N1SDP and Morello because they do not * follow ARM ARM in that the value updated in CNTFRQ is not * reflected in CNTBASEN_CNTFRQ. Hence update the value manually. */