aboutsummaryrefslogtreecommitdiff
path: root/hw/hppa
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-05-04 10:25:40 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-05-08 18:52:37 +0100
commite004499fd52f0bb10e1e77bedc3be0dbdd2e0f52 (patch)
tree2aae6f4819932de581e7e27586a271447e63120b /hw/hppa
parentcb9f6c4b65d48717be251dcb2a171152d00885e9 (diff)
lasi: use qdev GPIOs to wire up IRQs in lasi_initfn()
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20220504092600.10048-31-mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/hppa')
-rw-r--r--hw/hppa/lasi.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 9489a80bad..32c7514d3a 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -234,38 +234,31 @@ static void lasi_set_irq(void *opaque, int irq, int level)
DeviceState *lasi_initfn(MemoryRegion *address_space)
{
DeviceState *dev;
- LasiState *s;
dev = qdev_new(TYPE_LASI_CHIP);
- s = LASI_CHIP(dev);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
/* LAN */
if (enable_lasi_lan()) {
- qemu_irq lan_irq = qemu_allocate_irq(lasi_set_irq, s,
- LASI_IRQ_LAN_HPA);
- lasi_82596_init(address_space, LASI_LAN_HPA, lan_irq);
+ lasi_82596_init(address_space, LASI_LAN_HPA,
+ qdev_get_gpio_in(dev, LASI_IRQ_LAN_HPA));
}
/* Parallel port */
- qemu_irq lpt_irq = qemu_allocate_irq(lasi_set_irq, s,
- LASI_IRQ_LPT_HPA);
parallel_mm_init(address_space, LASI_LPT_HPA + 0x800, 0,
- lpt_irq, parallel_hds[0]);
+ qdev_get_gpio_in(dev, LASI_IRQ_LAN_HPA),
+ parallel_hds[0]);
if (serial_hd(1)) {
/* Serial port */
- qemu_irq serial_irq = qemu_allocate_irq(lasi_set_irq, s,
- LASI_IRQ_UART_HPA);
serial_mm_init(address_space, LASI_UART_HPA + 0x800, 0,
- serial_irq, 8000000 / 16,
+ qdev_get_gpio_in(dev, LASI_IRQ_UART_HPA), 8000000 / 16,
serial_hd(0), DEVICE_NATIVE_ENDIAN);
}
/* PS/2 Keyboard/Mouse */
- qemu_irq ps2kbd_irq = qemu_allocate_irq(lasi_set_irq, s,
- LASI_IRQ_PS2KBD_HPA);
- lasips2_init(address_space, LASI_PS2KBD_HPA, ps2kbd_irq);
+ lasips2_init(address_space, LASI_PS2KBD_HPA,
+ qdev_get_gpio_in(dev, LASI_IRQ_PS2KBD_HPA));
return dev;
}