mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53: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,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue