aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/macio/cuda.c
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 /hw/misc/macio/cuda.c
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 'hw/misc/macio/cuda.c')
-rw-r--r--hw/misc/macio/cuda.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index 233daf1..693fc82 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "hw/irq.h"
#include "hw/ppc/mac.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
@@ -96,9 +97,9 @@ static void cuda_set_sr_int(void *opaque)
CUDAState *s = opaque;
MOS6522CUDAState *mcs = &s->mos6522_cuda;
MOS6522State *ms = MOS6522(mcs);
- MOS6522DeviceClass *mdc = MOS6522_GET_CLASS(ms);
+ qemu_irq irq = qdev_get_gpio_in(DEVICE(ms), SR_INT_BIT);
- mdc->set_sr_int(ms);
+ qemu_set_irq(irq, 1);
}
static void cuda_delay_set_sr_int(CUDAState *s)