Hi Yannick, Corvin.

On 11/11/25 11:28, Corvin Köhne wrote:
From: YannickV <[email protected]>

The a9 global timer and arm mp timers rely on the PERIPHCLK as
their clock source. The current implementation does not take
that into account. That causes problems for applications assuming
other frequencies than 1 GHz.

This change makes sense, but IMHO we should model the source as a
Clock object (see docs/devel/clocks.rst).

We can now configure frequencies for the a9 global timer and
arm mp timer. By allowing these values to be set according to
the application's needs, we ensure that the timers behave
consistently with the expected system configuration. The SoC
configures the device correctly.

Information can be found in the Zynq 7000 SoC Technical
Reference Manual under Timers.
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM

Signed-off-by: YannickV <[email protected]>
---
  hw/timer/a9gtimer.c            |  9 ++++++---
  hw/timer/arm_mptimer.c         | 15 +++++++++++----
  include/hw/timer/a9gtimer.h    |  1 +
  include/hw/timer/arm_mptimer.h |  2 ++
  4 files changed, 20 insertions(+), 7 deletions(-)


Reply via email to