aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-05 15:09:49 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-09 09:28:28 +0000
commitebe5bca2ef10eb4f239a2e6e6a6f8ec748af1952 (patch)
tree9b30c83bb419c0e739ccddc86f53d139b5d43098 /include
parente787221ebfd4ff43b97fbbd1e9f8e0c4df7ff0c7 (diff)
downloadqemu-ebe5bca2ef10eb4f239a2e6e6a6f8ec748af1952.zip
qemu-ebe5bca2ef10eb4f239a2e6e6a6f8ec748af1952.tar.gz
qemu-ebe5bca2ef10eb4f239a2e6e6a6f8ec748af1952.tar.bz2
mos6522: switch over to use qdev gpios for IRQs
For historical reasons each mos6522 instance implements its own setting and update of the IFR flag bits using methods exposed by MOS6522DeviceClass. As of today this is no longer required, and it is now possible to implement the mos6522 IRQs as standard qdev gpios. Switch over to use qdev gpios for the mos6522 device and update all instances accordingly. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220305150957.5053-5-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/hw/misc/mac_via.h5
-rw-r--r--include/hw/misc/mos6522.h2
2 files changed, 2 insertions, 5 deletions
diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h
index 0af3463..5fe7a7f 100644
--- a/include/hw/misc/mac_via.h
+++ b/include/hw/misc/mac_via.h
@@ -24,8 +24,6 @@
#define VIA1_IRQ_ADB_DATA_BIT CB2_INT_BIT
#define VIA1_IRQ_ADB_CLOCK_BIT CB1_INT_BIT
-#define VIA1_IRQ_NB 8
-
#define VIA1_IRQ_ONE_SECOND BIT(VIA1_IRQ_ONE_SECOND_BIT)
#define VIA1_IRQ_60HZ BIT(VIA1_IRQ_60HZ_BIT)
#define VIA1_IRQ_ADB_READY BIT(VIA1_IRQ_ADB_READY_BIT)
@@ -42,7 +40,6 @@ struct MOS6522Q800VIA1State {
MemoryRegion via_mem;
- qemu_irq irqs[VIA1_IRQ_NB];
qemu_irq auxmode_irq;
uint8_t last_b;
@@ -85,8 +82,6 @@ struct MOS6522Q800VIA1State {
#define VIA2_IRQ_SCSI_BIT CB2_INT_BIT
#define VIA2_IRQ_ASC_BIT CB1_INT_BIT
-#define VIA2_IRQ_NB 8
-
#define VIA2_IRQ_SCSI_DATA BIT(VIA2_IRQ_SCSI_DATA_BIT)
#define VIA2_IRQ_NUBUS BIT(VIA2_IRQ_NUBUS_BIT)
#define VIA2_IRQ_UNUSED BIT(VIA2_IRQ_SCSI_BIT)
diff --git a/include/hw/misc/mos6522.h b/include/hw/misc/mos6522.h
index be5c90d..f38ae2b 100644
--- a/include/hw/misc/mos6522.h
+++ b/include/hw/misc/mos6522.h
@@ -57,6 +57,8 @@
#define T2_INT BIT(T2_INT_BIT)
#define T1_INT BIT(T1_INT_BIT)
+#define VIA_NUM_INTS 5
+
/* Bits in ACR */
#define T1MODE 0xc0 /* Timer 1 mode */
#define T1MODE_CONT 0x40 /* continuous interrupts */