summaryrefslogtreecommitdiffstats
path: root/hw/timer/grlib_gptimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/timer/grlib_gptimer.c')
-rw-r--r--hw/timer/grlib_gptimer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
index eff0ee3491..e539fc24f0 100644
--- a/hw/timer/grlib_gptimer.c
+++ b/hw/timer/grlib_gptimer.c
@@ -32,6 +32,7 @@
#include "qemu/module.h"
#include "trace.h"
+#include "qom/object.h"
#define UNIT_REG_SIZE 16 /* Size of memory mapped regs for the unit */
#define GPTIMER_REG_SIZE 16 /* Size of memory mapped regs for a GPTimer */
@@ -55,11 +56,11 @@
#define COUNTER_RELOAD_OFFSET 0x04
#define TIMER_BASE 0x10
-#define GRLIB_GPTIMER(obj) \
- OBJECT_CHECK(GPTimerUnit, (obj), TYPE_GRLIB_GPTIMER)
+typedef struct GPTimerUnit GPTimerUnit;
+DECLARE_INSTANCE_CHECKER(GPTimerUnit, GRLIB_GPTIMER,
+ TYPE_GRLIB_GPTIMER)
typedef struct GPTimer GPTimer;
-typedef struct GPTimerUnit GPTimerUnit;
struct GPTimer {
struct ptimer_state *ptimer;