hw/sd/sdhci: Let sdhci_update_irq() return if IRQ was delivered
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20200903172806.489710-4-f4bug@amsat.org>
This commit is contained in:
parent
45e5dc43b3
commit
2bd9ae7e30
@ -218,9 +218,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)
|
||||
|
Loading…
Reference in New Issue
Block a user