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

~axelheider posted 11 patches 3 years, 3 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>
[PATCH qemu.git 06/11] hw/timer/imx_epit: software reset clears the interrupt
Posted by ~axelheider 3 years, 3 months ago
From: Axel Heider <axel.heider@hensoldt.net>

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

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 */
-- 
2.34.5
Re: [PATCH qemu.git 06/11] hw/timer/imx_epit: software reset clears the interrupt
Posted by Philippe Mathieu-Daudé 3 years, 3 months ago
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>