[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/25] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type
From: |
Peter Maydell |
Subject: |
[PULL 16/25] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type |
Date: |
Mon, 27 Feb 2023 14:00:53 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230220115114.25237-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
include/hw/char/xilinx_uartlite.h | 6 +++++-
hw/char/xilinx_uartlite.c | 4 +---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/hw/char/xilinx_uartlite.h
b/include/hw/char/xilinx_uartlite.h
index dd09c068019..753d3a453ec 100644
--- a/include/hw/char/xilinx_uartlite.h
+++ b/include/hw/char/xilinx_uartlite.h
@@ -18,6 +18,10 @@
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "qapi/error.h"
+#include "qom/object.h"
+
+#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite"
+OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE)
static inline DeviceState *xilinx_uartlite_create(hwaddr addr,
qemu_irq irq,
@@ -26,7 +30,7 @@ static inline DeviceState *xilinx_uartlite_create(hwaddr addr,
DeviceState *dev;
SysBusDevice *s;
- dev = qdev_new("xlnx.xps-uartlite");
+ dev = qdev_new(TYPE_XILINX_UARTLITE);
s = SYS_BUS_DEVICE(dev);
qdev_prop_set_chr(dev, "chardev", chr);
sysbus_realize_and_unref(s, &error_fatal);
diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c
index 99b9a6f851e..180bb97202c 100644
--- a/hw/char/xilinx_uartlite.c
+++ b/hw/char/xilinx_uartlite.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
+#include "hw/char/xilinx_uartlite.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
@@ -53,9 +54,6 @@
#define CONTROL_RST_RX 0x02
#define CONTROL_IE 0x10
-#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite"
-OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE)
-
struct XilinxUARTLite {
SysBusDevice parent_obj;
--
2.34.1
- [PULL 14/25] hw/char/pl011: Un-inline pl011_create(), (continued)
- [PULL 14/25] hw/char/pl011: Un-inline pl011_create(), Peter Maydell, 2023/02/27
- [PULL 17/25] hw/char/xilinx_uartlite: Open-code xilinx_uartlite_create(), Peter Maydell, 2023/02/27
- [PULL 21/25] hw/arm/musicpal: Remove unused dummy MemoryRegion, Peter Maydell, 2023/02/27
- [PULL 25/25] hw: Replace qemu_or_irq typedef by OrIRQState, Peter Maydell, 2023/02/27
- [PULL 09/25] target/arm: Move regime_using_lpae_format into internal.h, Peter Maydell, 2023/02/27
- [PULL 15/25] hw/char/pl011: Open-code pl011_luminary_create(), Peter Maydell, 2023/02/27
- [PULL 07/25] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled, Peter Maydell, 2023/02/27
- [PULL 10/25] target/arm: Don't access TCG code when debugging with KVM, Peter Maydell, 2023/02/27
- [PULL 12/25] tests/avocado: add machine:none tag to version.py, Peter Maydell, 2023/02/27
- [PULL 03/25] target/arm: Wrap TCG-only code in debug_helper.c, Peter Maydell, 2023/02/27
- [PULL 16/25] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type,
Peter Maydell <=
- [PULL 20/25] hw/intc/armv7m_nvic: Use QOM cast CPU() macro, Peter Maydell, 2023/02/27
- [PULL 22/25] iothread: Remove unused IOThreadClass / IOTHREAD_CLASS, Peter Maydell, 2023/02/27
- [PULL 23/25] hw/irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE(), Peter Maydell, 2023/02/27
- [PULL 06/25] target/arm: Move psci.c into the tcg directory, Peter Maydell, 2023/02/27
- [PULL 04/25] target/arm: move translate modules to tcg/, Peter Maydell, 2023/02/27
- [PULL 11/25] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code, Peter Maydell, 2023/02/27
- [PULL 13/25] hw/gpio/max7310: Simplify max7310_realize(), Peter Maydell, 2023/02/27
- [PULL 19/25] hw/timer/cmsdk-apb-timer: Remove unused 'qdev-properties.h' header, Peter Maydell, 2023/02/27
- [PULL 18/25] hw/char/cmsdk-apb-uart: Open-code cmsdk_apb_uart_create(), Peter Maydell, 2023/02/27
- [PULL 24/25] hw/or-irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE(), Peter Maydell, 2023/02/27