diff options
author | Peter Maydell | 2018-03-02 11:45:38 +0100 |
---|---|---|
committer | Peter Maydell | 2018-03-02 12:03:45 +0100 |
commit | a7bc4ee528c66486e43e815429b4aaf8cf2049d5 (patch) | |
tree | 9609ad9d50f59948b509978b859328bbc6958464 /include/hw/misc | |
parent | target/arm: Add Cortex-M33 (diff) | |
download | qemu-a7bc4ee528c66486e43e815429b4aaf8cf2049d5.tar.gz qemu-a7bc4ee528c66486e43e815429b4aaf8cf2049d5.tar.xz qemu-a7bc4ee528c66486e43e815429b4aaf8cf2049d5.zip |
hw/misc/unimp: Move struct to header file
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 <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180220180325.29818-10-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/misc')
-rw-r--r-- | include/hw/misc/unimp.h | 10 |
1 files changed, 10 insertions, 0 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 |