[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 2/3] hw/misc: In STM32L4x5 EXTI, handle direct interrupts
From: |
Inès Varhol |
Subject: |
[PATCH v3 2/3] hw/misc: In STM32L4x5 EXTI, handle direct interrupts |
Date: |
Sun, 7 Jul 2024 10:58:54 +0200 |
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>
---
hw/misc/stm32l4x5_exti.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/misc/stm32l4x5_exti.c b/hw/misc/stm32l4x5_exti.c
index b9a69a69f6..e281841dcf 100644
--- a/hw/misc/stm32l4x5_exti.c
+++ b/hw/misc/stm32l4x5_exti.c
@@ -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))) {
--
2.43.2
- [PATCH v3 0/3] Connect STM32L4x5 USART devices to the EXTI, Inès Varhol, 2024/07/07
- [PATCH v3 1/3] hw/misc: In STM32L4x5 EXTI, consolidate 2 constants, Inès Varhol, 2024/07/07
- [PATCH v3 3/3] hw/arm: In STM32L4x5 SOC, connect USART devices to EXTI, Inès Varhol, 2024/07/07
- [PATCH v3 2/3] hw/misc: In STM32L4x5 EXTI, handle direct interrupts,
Inès Varhol <=
- Re: [PATCH v3 0/3] Connect STM32L4x5 USART devices to the EXTI, Peter Maydell, 2024/07/08