diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-06-24 14:41:01 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-06-26 18:40:12 +0100 |
commit | 97bc05971bb26588e114dcb8a8e96c14a8a8a202 (patch) | |
tree | 4176491e0150c4967be30b49ec7c7fe4bb987b39 /hw/input | |
parent | 1702627c3329e6f43b92addc6eb16fc420a4cf18 (diff) | |
download | qemu-97bc05971bb26588e114dcb8a8e96c14a8a8a202.zip qemu-97bc05971bb26588e114dcb8a8e96c14a8a8a202.tar.gz qemu-97bc05971bb26588e114dcb8a8e96c14a8a8a202.tar.bz2 |
lasips2: use sysbus IRQ for output IRQ
This enables the IRQ to be wired up using sysbus_connect_irq() in
lasips2_initfn().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220624134109.881989-47-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/input')
-rw-r--r-- | hw/input/lasips2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index 4940519..bd72505 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -247,16 +247,15 @@ static void lasips2_port_set_irq(void *opaque, int level) LASIPS2State *lasips2_initfn(hwaddr base, qemu_irq irq) { - LASIPS2State *s; DeviceState *dev; dev = qdev_new(TYPE_LASIPS2); qdev_prop_set_uint64(dev, "base", base); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); - s = LASIPS2(dev); - s->irq = irq; - return s; + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq); + + return LASIPS2(dev); } static void lasips2_realize(DeviceState *dev, Error **errp) @@ -285,6 +284,8 @@ static void lasips2_init(Object *obj) sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->kbd.reg); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mouse.reg); + + sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); } static Property lasips2_properties[] = { |