mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
e787221ebf
commit
ebe5bca2ef
6 changed files with 31 additions and 56 deletions
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue