[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] hw/sd/sdhci: Let sdhci_update_irq() return if IRQ was delive
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/4] hw/sd/sdhci: Let sdhci_update_irq() return if IRQ was delivered |
Date: |
Thu, 3 Sep 2020 19:28:05 +0200 |
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/sd/sdhci.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 2b197631870..06cb098036c 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -215,9 +215,14 @@ static uint8_t sdhci_slotint(SDHCIState *s)
((s->norintsts & SDHC_NIS_REMOVE) && (s->wakcon & SDHC_WKUP_ON_RMV));
}
-static inline void sdhci_update_irq(SDHCIState *s)
+/* Return true if IRQ was pending and delivered */
+static bool sdhci_update_irq(SDHCIState *s)
{
- qemu_set_irq(s->irq, sdhci_slotint(s));
+ bool pending = sdhci_slotint(s);
+
+ qemu_set_irq(s->irq, pending);
+
+ return pending;
}
static void sdhci_raise_insertion_irq(void *opaque)
--
2.26.2
- [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 1/4] hw/sd/sdhci: Stop multiple transfers when block count is cleared, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 2/4] hw/sd/sdhci: Resume pending DMA transfers on MMIO accesses, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 3/4] hw/sd/sdhci: Let sdhci_update_irq() return if IRQ was delivered,
Philippe Mathieu-Daudé <=
- [PATCH 4/4] hw/sd/sdhci: Yield if interrupt delivered during multiple transfer, Philippe Mathieu-Daudé, 2020/09/03
- Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers, Philippe Mathieu-Daudé, 2020/09/10
- Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers, Alexander Bulekov, 2020/09/10
- Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers, Philippe Mathieu-Daudé, 2020/09/18