lasips2: switch to using port-based IRQs
commit212a3003033224d1821e7cecc70b38d7a7f08ff4
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tue, 12 Jul 2022 21:52:39 +0000 (12 22:52 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 18 Jul 2022 18:28:46 +0000 (18 19:28 +0100)
treeb445e0c7b51bcc03232690bb7d8739e6b2eadfd0
parentca735a81b27c7b54b26202be479075acbc1657c5
lasips2: switch to using port-based IRQs

Now we can implement port-based IRQs by wiring the PS2 device IRQs to the
LASI2Port named input gpios rather than directly to the LASIPS2 device, and
generate the LASIPS2 output IRQ from the int_status bitmap representing the
individual port IRQs instead of the birq boolean.

This enables us to remove the separate PS2 keyboard and PS2 mouse named input
gpios from the LASIPS2 device and simplify the register implementation to
drive the port IRQ using qemu_set_irq() rather than accessing the LASIPS2
device IRQs directly. As a consequence the IRQ level logic in lasips2_set_irq()
can also be simplified accordingly.

For now this patch ignores adding the int_status bitmap and simply drops the
birq boolean from the vmstate_lasips2 VMStateDescription. This is because the
migration stream is already missing some required LASIPS2 fields, and as this
series already introduces a migration break for the lasips2 device it is
easiest to fix this in a follow-up patch.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Helge Deller <deller@gmx.de>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220712215251.7944-29-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/input/lasips2.c
include/hw/input/lasips2.h