summary refs log tree commit diff stats
path: root/include/hw/arm/armv7m.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/arm/armv7m.h')
-rw-r--r--include/hw/arm/armv7m.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index a30e3c6471..dcb891d9cc 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -13,11 +13,14 @@
 #include "hw/sysbus.h"
 #include "hw/intc/armv7m_nvic.h"
 #include "target/arm/idau.h"
+#include "qom/object.h"
 
 #define TYPE_BITBAND "ARM,bitband-memory"
-#define BITBAND(obj) OBJECT_CHECK(BitBandState, (obj), TYPE_BITBAND)
+typedef struct BitBandState BitBandState;
+DECLARE_INSTANCE_CHECKER(BitBandState, BITBAND,
+                         TYPE_BITBAND)
 
-typedef struct {
+struct BitBandState {
     /*< private >*/
     SysBusDevice parent_obj;
     /*< public >*/
@@ -26,10 +29,12 @@ typedef struct {
     MemoryRegion iomem;
     uint32_t base;
     MemoryRegion *source_memory;
-} BitBandState;
+};
 
 #define TYPE_ARMV7M "armv7m"
-#define ARMV7M(obj) OBJECT_CHECK(ARMv7MState, (obj), TYPE_ARMV7M)
+typedef struct ARMv7MState ARMv7MState;
+DECLARE_INSTANCE_CHECKER(ARMv7MState, ARMV7M,
+                         TYPE_ARMV7M)
 
 #define ARMV7M_NUM_BITBANDS 2
 
@@ -49,7 +54,7 @@ typedef struct {
  * + Property "dsp": enable DSP (forwarded to CPU object)
  * + Property "enable-bitband": expose bitbanded IO
  */
-typedef struct ARMv7MState {
+struct ARMv7MState {
     /*< private >*/
     SysBusDevice parent_obj;
     /*< public >*/
@@ -72,6 +77,6 @@ typedef struct ARMv7MState {
     bool start_powered_off;
     bool vfp;
     bool dsp;
-} ARMv7MState;
+};
 
 #endif