diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2016-05-19 10:00:28 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2016-05-20 15:29:30 +0100 |
commit | f3d3b316f82faa88e42f3d09c97cd9e52ac92599 (patch) | |
tree | 2a89c305731e64b9385d48cfac60b10779fd5fe3 /plat/arm/common | |
parent | d44863910c3e4021e13385c616d958f47faf7abc (diff) | |
download | arm-trusted-firmware-f3d3b316f82faa88e42f3d09c97cd9e52ac92599.tar.gz |
Implement plat_get_syscnt_freq2 on platforms
Replaced plat_get_syscnt_freq by plat_get_syscnt_freq2 on all
upstream platforms.
Change-Id: I3248f3f65a16dc5e9720012a05c35b9e3ba6abbe
Diffstat (limited to 'plat/arm/common')
-rw-r--r-- | plat/arm/common/aarch64/arm_common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plat/arm/common/aarch64/arm_common.c b/plat/arm/common/aarch64/arm_common.c index cf1f3ba9..616edc92 100644 --- a/plat/arm/common/aarch64/arm_common.c +++ b/plat/arm/common/aarch64/arm_common.c @@ -29,6 +29,7 @@ */ #include <arch.h> #include <arch_helpers.h> +#include <assert.h> #include <debug.h> #include <mmio.h> #include <plat_arm.h> @@ -40,7 +41,14 @@ extern const mmap_region_t plat_arm_mmap[]; /* Weak definitions may be overridden in specific ARM standard platform */ #pragma weak plat_get_ns_image_entrypoint #pragma weak plat_arm_get_mmap + +/* Conditionally provide a weak definition of plat_get_syscnt_freq2 to avoid + * conflicts with the definition in plat/common. */ +#if ERROR_DEPRECATED +#pragma weak plat_get_syscnt_freq2 +#else #pragma weak plat_get_syscnt_freq +#endif /******************************************************************************* * Macro generating the code for the function setting up the pagetables as per @@ -164,9 +172,16 @@ const mmap_region_t *plat_arm_get_mmap(void) } #ifdef ARM_SYS_CNTCTL_BASE + +#if ERROR_DEPRECATED +unsigned int plat_get_syscnt_freq2(void) +{ + unsigned int counter_base_frequency +#else unsigned long long plat_get_syscnt_freq(void) { unsigned long long counter_base_frequency; +#endif /* ERROR_DEPRECATED */ /* Read the frequency from Frequency modes table */ counter_base_frequency = mmio_read_32(ARM_SYS_CNTCTL_BASE + CNTFID_OFF); @@ -177,4 +192,5 @@ unsigned long long plat_get_syscnt_freq(void) return counter_base_frequency; } + #endif /* ARM_SYS_CNTCTL_BASE */ |