[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/39] hw/misc/unimp: Move struct to header file
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 13/39] hw/misc/unimp: Move struct to header file |
Date: |
Fri, 2 Mar 2018 11:06:14 +0000 |
Move the definition of the struct for the unimplemented-device
from unimp.c to unimp.h, so that users can embed the struct
in their own device structs if they prefer.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
---
include/hw/misc/unimp.h | 10 ++++++++++
hw/misc/unimp.c | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h
index 52e068ec3e..2a291ca42d 100644
--- a/include/hw/misc/unimp.h
+++ b/include/hw/misc/unimp.h
@@ -12,6 +12,16 @@
#define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device"
+#define UNIMPLEMENTED_DEVICE(obj) \
+ OBJECT_CHECK(UnimplementedDeviceState, (obj), TYPE_UNIMPLEMENTED_DEVICE)
+
+typedef struct {
+ SysBusDevice parent_obj;
+ MemoryRegion iomem;
+ char *name;
+ uint64_t size;
+} UnimplementedDeviceState;
+
/**
* create_unimplemented_device: create and map a dummy device
* @name: name of the device for debug logging
diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c
index bcbb585888..1c0ba2f0a7 100644
--- a/hw/misc/unimp.c
+++ b/hw/misc/unimp.c
@@ -18,16 +18,6 @@
#include "qemu/log.h"
#include "qapi/error.h"
-#define UNIMPLEMENTED_DEVICE(obj) \
- OBJECT_CHECK(UnimplementedDeviceState, (obj), TYPE_UNIMPLEMENTED_DEVICE)
-
-typedef struct {
- SysBusDevice parent_obj;
- MemoryRegion iomem;
- char *name;
- uint64_t size;
-} UnimplementedDeviceState;
-
static uint64_t unimp_read(void *opaque, hwaddr offset, unsigned size)
{
UnimplementedDeviceState *s = UNIMPLEMENTED_DEVICE(opaque);
--
2.16.2
- [Qemu-devel] [PULL 04/39] decodetree: Propagate return value from translate subroutines, (continued)
- [Qemu-devel] [PULL 04/39] decodetree: Propagate return value from translate subroutines, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 02/39] xlnx-zynqmp-rtc: Add basic time support, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 05/39] loader: Add new load_ramdisk_as(), Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 07/39] hw/arm/armv7m: Honour CPU's address space for image loads, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 08/39] target/arm: Define an IDAU interface, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 12/39] target/arm: Add Cortex-M33, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 09/39] armv7m: Forward idau property to CPU object, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 11/39] armv7m: Forward init-svtor property to CPU object, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 15/39] qdev: Add new qdev_init_gpio_in_named_with_opaque(), Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 06/39] hw/arm/boot: Honour CPU's address space for image loads, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 13/39] hw/misc/unimp: Move struct to header file,
Peter Maydell <=
- [Qemu-devel] [PULL 10/39] target/arm: Define init-svtor property for the reset secure VTOR value, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 17/39] hw/misc/mps2-fpgaio: FPGA control block for MPS2 AN505, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 16/39] hw/core/split-irq: Device that splits IRQ lines, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 14/39] include/hw/or-irq.h: Add missing include guard, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 19/39] hw/misc/iotkit-secctl: Arm IoT Kit security controller initial skeleton, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 21/39] hw/misc/iotkit-secctl: Add remaining simple registers, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 20/39] hw/misc/iotkit-secctl: Add handling for PPCs, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 24/39] target/arm: Add ARM_FEATURE_V8_RDM, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 26/39] target/arm: Refactor disas_simd_indexed size checks, Peter Maydell, 2018/03/02
- [Qemu-devel] [PULL 25/39] target/arm: Refactor disas_simd_indexed decode, Peter Maydell, 2018/03/02