On 25/10/22 12:33, ~axelheider wrote:
From: Axel Heider <axel.hei...@hensoldt.net>

The CNT register is a read-only register. There is no need to
store it's value, it can be calculated on demand.
The calculated frequency is needed temporarily only.

Signed-off-by: Axel Heider <axel.hei...@hensoldt.net>
---
  hw/timer/imx_epit.c         | 42 +++++++++++++++----------------------
  include/hw/timer/imx_epit.h |  2 --
  2 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index a79f58c963..37b04a1b53 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -77,23 +77,25 @@ static void imx_epit_update_int(IMXEPITState *s)
   * Must be called from within a ptimer_transaction_begin/commit block
   * for both s->timer_cmp and s->timer_reload.
   */
-static void imx_epit_set_freq(IMXEPITState *s)
+static uint32_t imx_epit_set_freq(IMXEPITState *s)

Maybe rename as imx_epit_get_freq() or simply imx_epit_freq(),
otherwise:

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to