diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-07-12 22:52:51 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-07-18 19:28:46 +0100 |
commit | b704d63d094cc757c20c186ff40d692deb5e30de (patch) | |
tree | 63b938964d3b7e19fb52e93a3a0126e42de76730 /hw/mips/jazz.c | |
parent | 46e9783fbeabfac3c4f07c0de5e32d8c322f7a07 (diff) | |
download | qemu-b704d63d094cc757c20c186ff40d692deb5e30de.zip qemu-b704d63d094cc757c20c186ff40d692deb5e30de.tar.gz qemu-b704d63d094cc757c20c186ff40d692deb5e30de.tar.bz2 |
pckbd: remove legacy i8042_mm_init() function
This legacy function is only used during the initialisation of the MIPS magnum
machine, so inline its functionality directly into mips_jazz_init() and then
remove it.
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>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220712215251.7944-41-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips/jazz.c')
-rw-r--r-- | hw/mips/jazz.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 1eb8bd5..6aefe9a 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -361,9 +361,16 @@ static void mips_jazz_init(MachineState *machine, memory_region_add_subregion(address_space, 0x80004000, rtc); /* Keyboard (i8042) */ - i8042 = i8042_mm_init(qdev_get_gpio_in(rc4030, 6), - qdev_get_gpio_in(rc4030, 7), - 0x1000, 0x1); + i8042 = I8042_MMIO(qdev_new(TYPE_I8042_MMIO)); + qdev_prop_set_uint64(DEVICE(i8042), "mask", 1); + qdev_prop_set_uint32(DEVICE(i8042), "size", 0x1000); + sysbus_realize_and_unref(SYS_BUS_DEVICE(i8042), &error_fatal); + + qdev_connect_gpio_out(DEVICE(i8042), I8042_KBD_IRQ, + qdev_get_gpio_in(rc4030, 6)); + qdev_connect_gpio_out(DEVICE(i8042), I8042_MOUSE_IRQ, + qdev_get_gpio_in(rc4030, 7)); + memory_region_add_subregion(address_space, 0x80005000, sysbus_mmio_get_region(SYS_BUS_DEVICE(i8042), 0)); |