summaryrefslogtreecommitdiffstats
path: root/hw/timer/puv3_ost.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/timer/puv3_ost.c')
-rw-r--r--hw/timer/puv3_ost.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/timer/puv3_ost.c b/hw/timer/puv3_ost.c
index f76b0bb1ca..3a35ac2b0a 100644
--- a/hw/timer/puv3_ost.c
+++ b/hw/timer/puv3_ost.c
@@ -15,15 +15,18 @@
#include "hw/ptimer.h"
#include "qemu/module.h"
#include "qemu/log.h"
+#include "qom/object.h"
#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
#define TYPE_PUV3_OST "puv3_ost"
-#define PUV3_OST(obj) OBJECT_CHECK(PUV3OSTState, (obj), TYPE_PUV3_OST)
+typedef struct PUV3OSTState PUV3OSTState;
+DECLARE_INSTANCE_CHECKER(PUV3OSTState, PUV3_OST,
+ TYPE_PUV3_OST)
/* puv3 ostimer implementation. */
-typedef struct PUV3OSTState {
+struct PUV3OSTState {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -34,7 +37,7 @@ typedef struct PUV3OSTState {
uint32_t reg_OSCR;
uint32_t reg_OSSR;
uint32_t reg_OIER;
-} PUV3OSTState;
+};
static uint64_t puv3_ost_read(void *opaque, hwaddr offset,
unsigned size)