aboutsummaryrefslogtreecommitdiff
path: root/hw/timer/slavio_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/timer/slavio_timer.c')
-rw-r--r--hw/timer/slavio_timer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
index 4c5d65e391..08d6888015 100644
--- a/hw/timer/slavio_timer.c
+++ b/hw/timer/slavio_timer.c
@@ -31,6 +31,7 @@
#include "migration/vmstate.h"
#include "trace.h"
#include "qemu/module.h"
+#include "qom/object.h"
/*
* Registers of hardware timer in sun4m.
@@ -59,16 +60,17 @@ typedef struct CPUTimerState {
} CPUTimerState;
#define TYPE_SLAVIO_TIMER "slavio_timer"
-#define SLAVIO_TIMER(obj) \
- OBJECT_CHECK(SLAVIO_TIMERState, (obj), TYPE_SLAVIO_TIMER)
+typedef struct SLAVIO_TIMERState SLAVIO_TIMERState;
+DECLARE_INSTANCE_CHECKER(SLAVIO_TIMERState, SLAVIO_TIMER,
+ TYPE_SLAVIO_TIMER)
-typedef struct SLAVIO_TIMERState {
+struct SLAVIO_TIMERState {
SysBusDevice parent_obj;
uint32_t num_cpus;
uint32_t cputimer_mode;
CPUTimerState cputimer[MAX_CPUS + 1];
-} SLAVIO_TIMERState;
+};
typedef struct TimerContext {
MemoryRegion iomem;