]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/misc: In STM32L4x5 EXTI, handle direct interrupts
authorInès Varhol <ines.varhol@telecom-paris.fr>
Sun, 7 Jul 2024 08:58:54 +0000 (10:58 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 11 Jul 2024 10:41:34 +0000 (11:41 +0100)
The previous implementation for EXTI interrupts only handled
"configurable" interrupts, like those originating from STM32L4x5 SYSCFG
(the only device currently connected to the EXTI up until now).

In order to connect STM32L4x5 USART to the EXTI, this commit adds
handling for direct interrupts (interrupts without configurable edge).

Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Message-id: 20240707085927.122867-3-ines.varhol@telecom-paris.fr
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/misc/stm32l4x5_exti.c

index b9a69a69f6000f84cf624ef3584fad65ef1e5015..e281841dcf44c3b416ac4dc16d1b0cda109b22c5 100644 (file)
@@ -113,6 +113,13 @@ static void stm32l4x5_exti_set_irq(void *opaque, int irq, int level)
         return;
     }
 
+    /* In case of a direct line interrupt */
+    if (extract32(exti_romask[bank], irq, 1)) {
+        qemu_set_irq(s->irq[oirq], level);
+        return;
+    }
+
+    /* In case of a configurable interrupt */
     if ((level && extract32(s->rtsr[bank], irq, 1)) ||
         (!level && extract32(s->ftsr[bank], irq, 1))) {