diff options
| -rw-r--r-- | bl31/aarch64/bl31_arch_setup.c | 2 | ||||
| -rw-r--r-- | docs/porting-guide.md | 4 | ||||
| -rw-r--r-- | include/plat/common/platform.h | 4 | ||||
| -rw-r--r-- | plat/common/aarch64/plat_common.c | 14 | ||||
| -rw-r--r-- | services/std_svc/psci/psci_suspend.c | 4 | 
5 files changed, 22 insertions, 6 deletions
| diff --git a/bl31/aarch64/bl31_arch_setup.c b/bl31/aarch64/bl31_arch_setup.c index 0871b419..3deacbae 100644 --- a/bl31/aarch64/bl31_arch_setup.c +++ b/bl31/aarch64/bl31_arch_setup.c @@ -44,7 +44,7 @@  void bl31_arch_setup(void)  {  	/* Program the counter frequency */ -	write_cntfrq_el0(plat_get_syscnt_freq()); +	write_cntfrq_el0(plat_get_syscnt_freq2());  	/* Initialize the cpu_ops pointer. */  	init_cpu_ops(); diff --git a/docs/porting-guide.md b/docs/porting-guide.md index 5004d309..0cd36134 100644 --- a/docs/porting-guide.md +++ b/docs/porting-guide.md @@ -1529,10 +1529,10 @@ state. This function must return a pointer to the `entry_point_info` structure  (that was copied during `bl31_early_platform_setup()`) if the image exists. It  should return NULL otherwise. -### Function : plat_get_syscnt_freq() [mandatory] +### Function : plat_get_syscnt_freq2() [mandatory]      Argument : void -    Return   : uint64_t +    Return   : unsigned int  This function is used by the architecture setup code to retrieve the counter  frequency for the CPU's generic timer.  This value will be programmed into the diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index 42260e9f..a08a12e4 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -56,7 +56,9 @@ struct image_desc;  /*******************************************************************************   * Mandatory common functions   ******************************************************************************/ -unsigned long long plat_get_syscnt_freq(void); +unsigned long long plat_get_syscnt_freq(void) __deprecated; +unsigned int plat_get_syscnt_freq2(void); +  int plat_get_image_source(unsigned int image_id,  			uintptr_t *dev_handle,  			uintptr_t *image_spec); 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 */ diff --git a/services/std_svc/psci/psci_suspend.c b/services/std_svc/psci/psci_suspend.c index bd0c5dbc..367bb32a 100644 --- a/services/std_svc/psci/psci_suspend.c +++ b/services/std_svc/psci/psci_suspend.c @@ -214,7 +214,7 @@ exit:  void psci_cpu_suspend_finish(unsigned int cpu_idx,  			     psci_power_state_t *state_info)  { -	unsigned long long counter_freq; +	unsigned int counter_freq;  	unsigned int max_off_lvl;  	/* Ensure we have been woken up from a suspended state */ @@ -238,7 +238,7 @@ void psci_cpu_suspend_finish(unsigned int cpu_idx,  	psci_do_pwrup_cache_maintenance();  	/* Re-init the cntfrq_el0 register */ -	counter_freq = plat_get_syscnt_freq(); +	counter_freq = plat_get_syscnt_freq2();  	write_cntfrq_el0(counter_freq);  	/* | 
