ARMv7 may not support Generic Timer Extension
authorEtienne Carriere <etienne.carriere@linaro.org>
Wed, 8 Nov 2017 13:41:47 +0000 (14:41 +0100)
committerEtienne Carriere <etienne.carriere@linaro.org>
Wed, 8 Nov 2017 13:41:47 +0000 (14:41 +0100)
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>
lib/psci/psci_setup.c
make_helpers/armv7-a-cpus.mk

index a841ddab9c220f89de82b0d53e72679adca00c8f..c00bd94ac4ad2a43928398aaecd83b74149fc4fd 100644 (file)
@@ -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();
index 120b36c7b9e551ab44b4fa25de1cf30eb95a6c5d..20e7ec533ed8fead274f60b64ce09fa1c6dfa3e5 100644 (file)
@@ -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