Mark Cave-Ayland
62201e4336
lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device
...
This will soon be used to store the reference to the LASIPS2_PORT parent device
for LASIPS2_KBD_PORT and LASIPS2_MOUSE_PORT.
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-26-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
8db817be78
lasips2: introduce port IRQ and new lasips2_port_init() function
...
Introduce a new lasips2_port_init() QOM init function for the LASIPS2_PORT type
and use it to initialise a new gpio for use as a port IRQ. Add a new qemu_irq
representing the gpio as a new irq field within LASIPS2Port.
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-25-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
c553d6c054
lasips2: rename LASIPS2Port irq field to birq
...
The existing boolean irq field in LASIPS2Port will soon be replaced by a proper
qemu_irq, so rename the field to birq to allow the upcoming qemu_irq to use the
irq name.
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-24-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
a088ce9b4b
lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function
...
Move the initialisation of the mouse port from lasips2_init() to
a new lasips2_mouse_port_init() function which will be invoked using
object_initialize_child() during the LASIPS2 device init.
Update LASIPS2State so that it now holds the new LASIPS2MousePort child object and
ensure that it is realised in lasips2_realize().
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-21-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
b7047733dc
lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function
...
Move the initialisation of the keyboard port from lasips2_init() to
a new lasips2_kbd_port_init() function which will be invoked using
object_initialize_child() during the LASIPS2 device init.
Update LASIPS2State so that it now holds the new LASIPS2KbdPort child object and
ensure that it is realised in lasips2_realize().
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-20-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
cb5827cee3
lasips2: introduce new LASIPS2_MOUSE_PORT QOM type
...
This will be soon be used to hold the underlying PS2_MOUSE_DEVICE object.
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-19-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
ef90a06f99
lasips2: introduce new LASIPS2_KBD_PORT QOM type
...
This will be soon be used to hold the underlying PS2_KBD_DEVICE object.
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-18-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
f8d89a7da4
lasips2: QOMify LASIPS2Port
...
This becomes an abstract QOM type which will be a parent type for separate
keyboard and mouse port types.
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-17-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
f4907cb5cf
lasips2: change LASIPS2State dev pointer from void to PS2State
...
This allows the compiler to enforce that the PS2 device pointer is always of
type PS2State. Update the name of the pointer from dev to ps2dev to emphasise
this type change.
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-16-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
92bd278c3b
lasips2: remove legacy lasips2_initfn() function
...
There is only one user of the legacy lasips2_initfn() function which is in
machine_hppa_init(), so inline its functionality into machine_hppa_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-15-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
4040ee5bdd
lasips2: remove the qdev base property and the lasips2_properties array
...
The base property was only needed for use by vmstate_register() in order to
preserve migration compatibility. Now that the lasips2 migration state is
registered through the DeviceClass vmsd field, the base property and also
the lasips2_properties array can be removed completely as they are no longer
required.
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-14-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
6f9f245b93
pl050: don't use legacy ps2_mouse_init() function
...
Instantiate the PS2 mouse device within PL050MouseState using
object_initialize_child() in pl050_mouse_init() and realize it in
pl050_mouse_realize() accordingly.
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-12-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
Mark Cave-Ayland
6a05d0b3d1
pl050: don't use legacy ps2_kbd_init() function
...
Instantiate the PS2 keyboard device within PL050KbdState using
object_initialize_child() in pl050_kbd_init() and realize it in
pl050_kbd_realize() accordingly.
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-11-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
475a4d463b
pl050: introduce PL050DeviceClass for the PL050 device
...
This will soon be used to store the reference to the PL050 parent device
for PL050_KBD_DEVICE and PL050_MOUSE_DEVICE.
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-8-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
0a3c1e1bf8
pl050: introduce new PL050_MOUSE_DEVICE QOM type
...
This will be soon be used to hold the underlying PS2_MOUSE_DEVICE object.
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-6-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
1d59315d97
pl050: introduce new PL050_KBD_DEVICE QOM type
...
This will be soon be used to hold the underlying PS2_KBD_DEVICE object.
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-5-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
33e0958e7e
pl050: change PL050State dev pointer from void to PS2State
...
This allows the compiler to enforce that the PS2 device pointer is always of
type PS2State. Update the name of the pointer from dev to ps2dev to emphasise
this type change.
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-4-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
bce0e9c1ec
pl050: move PL050State from pl050.c to new pl050.h header file
...
This allows the QOM types in pl050.c to be used elsewhere by simply including
pl050.h.
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-2-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:45 +01:00
Mark Cave-Ayland
7227de94ad
ps2: remove update_irq() function and update_arg parameter
...
Now that all the PS2 devices have been converted to use GPIOs the update_irq()
callback function and the update_arg parameter can be removed.
This allows these arguments to be completely removed from ps2_kbd_init() and
ps2_mouse_init(), along with the transitional logic that was added to
ps2_raise_irq() and ps2_lower_irq().
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-55-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
38f426b8af
pckbd: add QEMU interface comment for I8042 device
...
This describes the I8042 device interface implemented within QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220624134109.881989-54-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
57de3c1d35
pckbd: add QEMU interface comment for I8042_MMIO device
...
This describes the I8042_MMIO device interface implemented within QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220624134109.881989-51-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
501f062e91
lasips2: add QEMU interface comment
...
This describes the LASI PS2 device interface implemented within QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220624134109.881989-49-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
42119fdb2e
lasips2: add base property
...
This is in preparation for handling vmstate_register() within the device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Message-Id: <20220624134109.881989-45-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
6479296fe5
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 >
2022-06-26 18:40:12 +01:00
Mark Cave-Ayland
5cbf35d20f
lasips2: rename lasips2_init() to lasips2_initfn() and update it to return the LASIPS2 device
...
When QOMifying a device it is typical to use _init() as the suffix for an
instance_init function, however this name is already in use by the legacy LASIPS2
wrapper function. Eventually the wrapper function will be removed, but for now
rename it to lasips2_initfn() to avoid a naming collision.
At the same time update lasips2_initfn() return the LASIPS2 device so that it
can later be accessed using qdev APIs by the HPPA machine.
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-41-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00