summary refs log tree commit diff stats
path: root/include/hw/misc
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-06-28 17:03:34 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-07-02 06:58:48 +0200
commitefb359346c7af62dfa86f7ae7d3717a098b239f5 (patch)
treeb9f9f4365f723b1c93e13e3db1530ac88d3d071d /include/hw/misc
parent0ff3243a4686b020c554c62efbb25df1d4712b97 (diff)
downloadfocaccia-qemu-efb359346c7af62dfa86f7ae7d3717a098b239f5.tar.gz
focaccia-qemu-efb359346c7af62dfa86f7ae7d3717a098b239f5.zip
hw/ide/macio: switch from using qemu_allocate_irq() to qdev input GPIOs
This prevents the IRQs from being leaked when the macio IDE device is used.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240628160334.653168-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/hw/misc')
-rw-r--r--include/hw/misc/macio/macio.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 2b54da6b31..16aa95b876 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -80,8 +80,6 @@ struct MACIOIDEState {
     uint32_t channel;
     qemu_irq real_ide_irq;
     qemu_irq real_dma_irq;
-    qemu_irq ide_irq;
-    qemu_irq dma_irq;
 
     MemoryRegion mem;
     IDEBus bus;
@@ -92,6 +90,11 @@ struct MACIOIDEState {
     uint32_t irq_reg;
 };
 
+#define MACIO_IDE_PMAC_NIRQS 2
+
+#define MACIO_IDE_PMAC_DMA_IRQ 0
+#define MACIO_IDE_PMAC_IDE_IRQ 1
+
 void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table);
 void macio_ide_register_dma(MACIOIDEState *ide);