diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2016-05-18 16:53:31 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2016-05-20 15:29:03 +0100 |
commit | d44863910c3e4021e13385c616d958f47faf7abc (patch) | |
tree | 8228e7de6c2da6d84d04181eb67a328db82608e2 /plat/common | |
parent | d1d716531db8d52101d9168a79d4b6acaef976fe (diff) |
Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit
plat_get_syscnt_freq. The old one has been flagged as deprecated.
Common code has been updated to use this new version. Porting guide
has been updated.
Change-Id: I9e913544926c418970972bfe7d81ee88b4da837e
Diffstat (limited to 'plat/common')
-rw-r--r-- | plat/common/aarch64/plat_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plat/common/aarch64/plat_common.c b/plat/common/aarch64/plat_common.c index 9070c613..43223415 100644 --- a/plat/common/aarch64/plat_common.c +++ b/plat/common/aarch64/plat_common.c @@ -40,6 +40,9 @@ #pragma weak bl31_plat_enable_mmu #pragma weak bl32_plat_enable_mmu #pragma weak bl31_plat_runtime_setup +#if !ERROR_DEPRECATED +#pragma weak plat_get_syscnt_freq2 +#endif /* ERROR_DEPRECATED */ void bl31_plat_enable_mmu(uint32_t flags) { @@ -74,3 +77,14 @@ unsigned int platform_core_pos_helper(unsigned long mpidr) } #endif + +#if !ERROR_DEPRECATED +unsigned int plat_get_syscnt_freq2(void) +{ + unsigned long long freq = plat_get_syscnt_freq(); + + assert(freq >> 32 == 0); + + return (unsigned int)freq; +} +#endif /* ERROR_DEPRECATED */ |