Commit 9f0ddae3 authored by Rajan Vaja's avatar Rajan Vaja Committed by Manish Pandey
Browse files

plat: xilinx: zynqmp: Configure counter frequency during initialization



Counter frequency for generic timer of Arm-A53 based Application
Processing Unit(APU) is not configuring in case if First Stage Boot
Loader(FSBL) does not initialize counter frequency. This happens
when FSBL is running from Arm-R5 based Real-time Processing Unit(RPU).
Because of that generic timer driver functionality is not working.
So configure counter frequency during initialization.
Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
Change-Id: Icfccd59d7d2340fba25ebfb2ef6a813af4290896
parent 89a05821
......@@ -350,10 +350,19 @@ unsigned int zynqmp_get_bootmode(void)
void zynqmp_config_setup(void)
{
uint64_t counter_freq;
/* Configure IPI data for ZynqMP */
zynqmp_ipi_config_table_init();
zynqmp_print_platform_name();
/* Configure counter frequency */
counter_freq = read_cntfrq_el0();
if (counter_freq == ZYNQMP_DEFAULT_COUNTER_FREQ) {
write_cntfrq_el0(plat_get_syscnt_freq2());
}
generic_delay_timer_init();
}
......
......@@ -17,6 +17,9 @@
#define ZYNQMP_CONSOLE_IS(con) (ZYNQMP_CONSOLE_ID_ ## con == ZYNQMP_CONSOLE)
/* Default counter frequency */
#define ZYNQMP_DEFAULT_COUNTER_FREQ 0U
/* Firmware Image Package */
#define ZYNQMP_PRIMARY_CPU 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment