summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Carriere <etienne.carriere@linaro.org>2017-11-08 14:41:47 +0100
committerEtienne Carriere <etienne.carriere@linaro.org>2017-11-08 14:41:47 +0100
commit86e2683597ec145cb2b679be0fff6f8962ba9bfd (patch)
tree3a1acc416b0b0a7affc7de45d06d241c761614a3
parent64cc6e91e819ccbf5fe3bf8a5c177b8fa8012d8c (diff)
ARMv7 may not support Generic Timer Extension
If ARMv7 based platform does not set ARM_CORTEX_Ax=yes, platform shall define ARMV7_SUPPORTS_GENERIC_TIMER to enable generic timer support. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
-rw-r--r--lib/psci/psci_setup.c2
-rw-r--r--make_helpers/armv7-a-cpus.mk4
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/psci/psci_setup.c b/lib/psci/psci_setup.c
index a841ddab..c00bd94a 100644
--- a/lib/psci/psci_setup.c
+++ b/lib/psci/psci_setup.c
@@ -266,8 +266,10 @@ int psci_setup(const psci_lib_args_t *lib_args)
******************************************************************************/
void psci_arch_setup(void)
{
+#if ARM_ARCH_MAJOR > 7 || defined(ARMV7_SUPPORTS_GENERIC_TIMER)
/* Program the counter frequency */
write_cntfrq_el0(plat_get_syscnt_freq2());
+#endif
/* Initialize the cpu_ops pointer. */
init_cpu_ops();
diff --git a/make_helpers/armv7-a-cpus.mk b/make_helpers/armv7-a-cpus.mk
index 120b36c7..20e7ec53 100644
--- a/make_helpers/armv7-a-cpus.mk
+++ b/make_helpers/armv7-a-cpus.mk
@@ -39,8 +39,12 @@ endif
#
# ARMV7_SUPPORTS_VIRTUALIZATION
# Defined if ARMv7 core supports the Virtualization extension.
+#
+# ARMV7_SUPPORTS_GENERIC_TIMER
+# Defined if ARMv7 core supports the Generic Timer extension.
ifeq ($(filter yes,$(ARM_CORTEX_A7) $(ARM_CORTEX_A12) $(ARM_CORTEX_A15) $(ARM_CORTEX_A17)),yes)
$(eval $(call add_define,ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING))
$(eval $(call add_define,ARMV7_SUPPORTS_VIRTUALIZATION))
+$(eval $(call add_define,ARMV7_SUPPORTS_GENERIC_TIMER))
endif