[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/40] lasips2: remove the qdev base property and the lasips2_pro
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 13/40] lasips2: remove the qdev base property and the lasips2_properties array |
Date: |
Wed, 29 Jun 2022 13:39:59 +0100 |
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>
---
hw/hppa/machine.c | 3 +--
hw/input/lasips2.c | 9 +--------
include/hw/input/lasips2.h | 3 +--
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 44ecd446c3..6080037cf1 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -280,8 +280,7 @@ static void machine_hppa_init(MachineState *machine)
}
/* PS/2 Keyboard/Mouse */
- dev = DEVICE(lasips2_initfn(LASI_PS2KBD_HPA,
- qdev_get_gpio_in(lasi_dev,
+ dev = DEVICE(lasips2_initfn(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),
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index d4fa248729..40f77baf3e 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -255,12 +255,11 @@ static void lasips2_set_mouse_irq(void *opaque, int n,
int level)
lasips2_update_irq(port->parent);
}
-LASIPS2State *lasips2_initfn(hwaddr base, qemu_irq irq)
+LASIPS2State *lasips2_initfn(qemu_irq irq)
{
DeviceState *dev;
dev = qdev_new(TYPE_LASIPS2);
- qdev_prop_set_uint64(dev, "base", base);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
@@ -307,18 +306,12 @@ static void lasips2_init(Object *obj)
"ps2-mouse-input-irq", 1);
}
-static Property lasips2_properties[] = {
- DEFINE_PROP_UINT64("base", LASIPS2State, base, UINT64_MAX),
- DEFINE_PROP_END_OF_LIST(),
-};
-
static void lasips2_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = lasips2_realize;
dc->vmsd = &vmstate_lasips2;
- device_class_set_props(dc, lasips2_properties);
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
}
diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h
index 03f0c9e9f9..f051c970f0 100644
--- a/include/hw/input/lasips2.h
+++ b/include/hw/input/lasips2.h
@@ -39,7 +39,6 @@ typedef struct LASIPS2Port {
struct LASIPS2State {
SysBusDevice parent_obj;
- hwaddr base;
LASIPS2Port kbd;
LASIPS2Port mouse;
qemu_irq irq;
@@ -48,6 +47,6 @@ struct LASIPS2State {
#define TYPE_LASIPS2 "lasips2"
OBJECT_DECLARE_SIMPLE_TYPE(LASIPS2State, LASIPS2)
-LASIPS2State *lasips2_initfn(hwaddr base, qemu_irq irq);
+LASIPS2State *lasips2_initfn(qemu_irq irq);
#endif /* HW_INPUT_LASIPS2_H */
--
2.30.2
- [PATCH 06/40] pl050: move logic from pl050_realize() to pl050_init(), (continued)
- [PATCH 06/40] pl050: move logic from pl050_realize() to pl050_init(), Mark Cave-Ayland, 2022/06/29
- [PATCH 05/40] pl050: introduce new PL050_MOUSE_DEVICE QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 08/40] pl050: introduce pl050_kbd_class_init() and pl050_kbd_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 11/40] pl050: don't use legacy ps2_mouse_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 03/40] pl050: change PL050State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/06/29
- [PATCH 04/40] pl050: introduce new PL050_KBD_DEVICE QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 07/40] pl050: introduce PL050DeviceClass for the PL050 device, Mark Cave-Ayland, 2022/06/29
- [PATCH 02/40] pl050: rename pl050_keyboard_init() to pl050_kbd_init(), Mark Cave-Ayland, 2022/06/29
- [PATCH 09/40] pl050: introduce pl050_mouse_class_init() and pl050_mouse_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 12/40] lasips2: don't use vmstate_register() in lasips2_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 13/40] lasips2: remove the qdev base property and the lasips2_properties array,
Mark Cave-Ayland <=
- [PATCH 14/40] lasips2: remove legacy lasips2_initfn() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/06/29
- [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 16/40] lasips2: QOMify LASIPS2Port, Mark Cave-Ayland, 2022/06/29
- [PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq, Mark Cave-Ayland, 2022/06/29