diff mbox series

[qemu.git,06/11] hw/timer/imx_epit: software reset clears the interrupt

Message ID 166718254546.5893.5075929684621857903-6@git.sr.ht
State New
Headers show
Series improve hw/timer/imx_epit | expand

Commit Message

~axelheider Oct. 25, 2022, 6:32 p.m. UTC
From: Axel Heider <axel.heider@hensoldt.net>

---
 hw/timer/imx_epit.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Philippe Mathieu-Daudé Oct. 31, 2022, 8:21 a.m. UTC | #1
On 25/10/22 20:32, ~axelheider wrote:
> From: Axel Heider <axel.heider@hensoldt.net>
> 
> ---
>   hw/timer/imx_epit.c | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/hw/timer/imx_epit.c b/hw/timer/imx_epit.c
index d21cbf16f6..2e4ff89613 100644
--- a/hw/timer/imx_epit.c
+++ b/hw/timer/imx_epit.c
@@ -97,6 +97,9 @@  static void imx_epit_reset(DeviceState *dev)
     s->sr = 0;
     s->lr = EPIT_TIMER_MAX;
     s->cmp = 0;
+    /* clear the interrupt */
+    qemu_irq_lower(s->irq);
+
     ptimer_transaction_begin(s->timer_cmp);
     ptimer_transaction_begin(s->timer_reload);
     /* stop both timers */