[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/40] pl050: introduce PL050DeviceClass for the PL050 device
From: |
Mark Cave-Ayland |
Subject: |
[PULL 07/40] pl050: introduce PL050DeviceClass for the PL050 device |
Date: |
Mon, 18 Jul 2022 19:33:06 +0100 |
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>
---
hw/input/pl050.c | 2 ++
include/hw/input/pl050.h | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index e32d86005a..d7796b73a1 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -216,6 +216,8 @@ static const TypeInfo pl050_type_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_init = pl050_init,
.instance_size = sizeof(PL050State),
+ .class_init = pl050_class_init,
+ .class_size = sizeof(PL050DeviceClass),
.abstract = true,
.class_init = pl050_class_init,
};
diff --git a/include/hw/input/pl050.h b/include/hw/input/pl050.h
index bb0e87ff45..203f03a194 100644
--- a/include/hw/input/pl050.h
+++ b/include/hw/input/pl050.h
@@ -16,8 +16,14 @@
#include "hw/input/ps2.h"
#include "hw/irq.h"
+struct PL050DeviceClass {
+ SysBusDeviceClass parent_class;
+
+ DeviceRealize parent_realize;
+};
+
#define TYPE_PL050 "pl050"
-OBJECT_DECLARE_SIMPLE_TYPE(PL050State, PL050)
+OBJECT_DECLARE_TYPE(PL050State, PL050DeviceClass, PL050)
struct PL050State {
SysBusDevice parent_obj;
--
2.30.2
- [PULL 00/40] qemu-sparc queue 20220718, Mark Cave-Ayland, 2022/07/18
- [PULL 01/40] pl050: move PL050State from pl050.c to new pl050.h header file, Mark Cave-Ayland, 2022/07/18
- [PULL 02/40] pl050: rename pl050_keyboard_init() to pl050_kbd_init(), Mark Cave-Ayland, 2022/07/18
- [PULL 04/40] pl050: introduce new PL050_KBD_DEVICE QOM type, Mark Cave-Ayland, 2022/07/18
- [PULL 06/40] pl050: move logic from pl050_realize() to pl050_init(), Mark Cave-Ayland, 2022/07/18
- [PULL 03/40] pl050: change PL050State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/07/18
- [PULL 05/40] pl050: introduce new PL050_MOUSE_DEVICE QOM type, Mark Cave-Ayland, 2022/07/18
- [PULL 07/40] pl050: introduce PL050DeviceClass for the PL050 device,
Mark Cave-Ayland <=
- [PULL 09/40] pl050: introduce pl050_mouse_class_init() and pl050_mouse_realize(), Mark Cave-Ayland, 2022/07/18
- [PULL 08/40] pl050: introduce pl050_kbd_class_init() and pl050_kbd_realize(), Mark Cave-Ayland, 2022/07/18
- [PULL 11/40] pl050: don't use legacy ps2_mouse_init() function, Mark Cave-Ayland, 2022/07/18
- [PULL 10/40] pl050: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/07/18
- [PULL 12/40] lasips2: don't use vmstate_register() in lasips2_realize(), Mark Cave-Ayland, 2022/07/18
- [PULL 13/40] lasips2: remove the qdev base property and the lasips2_properties array, Mark Cave-Ayland, 2022/07/18
- [PULL 14/40] lasips2: remove legacy lasips2_initfn() function, Mark Cave-Ayland, 2022/07/18
- [PULL 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State, Mark Cave-Ayland, 2022/07/18
- [PULL 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type, Mark Cave-Ayland, 2022/07/18
- [PULL 16/40] lasips2: QOMify LASIPS2Port, Mark Cave-Ayland, 2022/07/18