lasips2: move mapping of LASIPS2 registers to HPPA machine

Now that the register memory regions are exposed as SysBus memory regions, move
the mapping of the LASIPS2 registers from lasips2_initfn() to the HPPA machine
(which is its only user).

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220624134109.881989-43-mark.cave-ayland@ilande.co.uk>
This commit is contained in:
Mark Cave-Ayland 2022-06-24 14:40:57 +01:00
parent 63195aa5a5
commit 6479296fe5
3 changed files with 11 additions and 10 deletions

View file

@ -280,8 +280,15 @@ static void machine_hppa_init(MachineState *machine)
}
/* PS/2 Keyboard/Mouse */
lasips2_initfn(addr_space, LASI_PS2KBD_HPA,
qdev_get_gpio_in(lasi_dev, LASI_IRQ_PS2KBD_HPA));
dev = DEVICE(lasips2_initfn(LASI_PS2KBD_HPA,
qdev_get_gpio_in(lasi_dev,
LASI_IRQ_PS2KBD_HPA)));
memory_region_add_subregion(addr_space, LASI_PS2KBD_HPA,
sysbus_mmio_get_region(SYS_BUS_DEVICE(dev),
0));
memory_region_add_subregion(addr_space, LASI_PS2KBD_HPA + 0x100,
sysbus_mmio_get_region(SYS_BUS_DEVICE(dev),
1));
/* register power switch emulation */
qemu_register_powerdown_notifier(&hppa_system_powerdown_notifier);