forked from Imagelibrary/rtems
arm/xilinx-zynqmp-rpu: Fix clock driver
We observed a strange behavior of the 1Hz timer when running cFS on Zynq RPU. After some investigation, we reduced the error to the truncation issue. This patch fixes the issue.
This commit is contained in:
committed by
Sebastian Huber
parent
9c84037e93
commit
ef9a74fc1a
@@ -126,7 +126,7 @@ static void zynqmp_ttc_clock_driver_support_initialize_hardware(void)
|
||||
|
||||
/* Setup match register to generate tick IRQ */
|
||||
ttc_clock_instance.irq_match_interval =
|
||||
(uint32_t) ((frequency * microsec_per_tick) / 1000000);
|
||||
(uint32_t) (((uint64_t)frequency * microsec_per_tick) / 1000000);
|
||||
XTtcPs_WriteReg(BSP_SELECTED_TTC_ADDR, XTTCPS_MATCH_0_OFFSET,
|
||||
ttc_clock_instance.irq_match_interval);
|
||||
/* Clear interupts (clear on read) */
|
||||
|
||||
Reference in New Issue
Block a user