[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/40] pl050: move PL050State from pl050.c to new pl050.h header
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 01/40] pl050: move PL050State from pl050.c to new pl050.h header file |
Date: |
Wed, 29 Jun 2022 13:39:47 +0100 |
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>
---
hw/input/pl050.c | 16 +---------------
include/hw/input/pl050.h | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 15 deletions(-)
create mode 100644 include/hw/input/pl050.h
diff --git a/hw/input/pl050.c b/hw/input/pl050.c
index 209cc001cf..c7980b6ed7 100644
--- a/hw/input/pl050.c
+++ b/hw/input/pl050.c
@@ -19,26 +19,12 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/input/ps2.h"
+#include "hw/input/pl050.h"
#include "hw/irq.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "qom/object.h"
-#define TYPE_PL050 "pl050"
-OBJECT_DECLARE_SIMPLE_TYPE(PL050State, PL050)
-
-struct PL050State {
- SysBusDevice parent_obj;
-
- MemoryRegion iomem;
- void *dev;
- uint32_t cr;
- uint32_t clk;
- uint32_t last;
- int pending;
- qemu_irq irq;
- bool is_mouse;
-};
static const VMStateDescription vmstate_pl050 = {
.name = "pl050",
diff --git a/include/hw/input/pl050.h b/include/hw/input/pl050.h
new file mode 100644
index 0000000000..2bbf7a9d50
--- /dev/null
+++ b/include/hw/input/pl050.h
@@ -0,0 +1,35 @@
+/*
+ * Arm PrimeCell PL050 Keyboard / Mouse Interface
+ *
+ * Copyright (c) 2006-2007 CodeSourcery.
+ * Written by Paul Brook
+ *
+ * This code is licensed under the GPL.
+ */
+
+#ifndef HW_PL050_H
+#define HW_PL050_H
+
+#include "qemu/osdep.h"
+#include "hw/sysbus.h"
+#include "migration/vmstate.h"
+#include "hw/input/ps2.h"
+#include "hw/irq.h"
+
+#define TYPE_PL050 "pl050"
+OBJECT_DECLARE_SIMPLE_TYPE(PL050State, PL050)
+
+struct PL050State {
+ SysBusDevice parent_obj;
+
+ MemoryRegion iomem;
+ void *dev;
+ uint32_t cr;
+ uint32_t clk;
+ uint32_t last;
+ int pending;
+ qemu_irq irq;
+ bool is_mouse;
+};
+
+#endif
--
2.30.2
- [PATCH 00/40] PS2 device QOMification - part 2, Mark Cave-Ayland, 2022/06/29
- [PATCH 01/40] pl050: move PL050State from pl050.c to new pl050.h header file,
Mark Cave-Ayland <=
- [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