aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/zynq_slcr.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/zynq_slcr.c')
-rw-r--r--hw/misc/zynq_slcr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
index f7472d1f3c..bedf09a6f5 100644
--- a/hw/misc/zynq_slcr.c
+++ b/hw/misc/zynq_slcr.c
@@ -23,6 +23,7 @@
#include "qemu/module.h"
#include "hw/registerfields.h"
#include "hw/qdev-clock.h"
+#include "qom/object.h"
#ifndef ZYNQ_SLCR_ERR_DEBUG
#define ZYNQ_SLCR_ERR_DEBUG 0
@@ -182,9 +183,11 @@ REG32(DDRIOB, 0xb40)
#define ZYNQ_SLCR_NUM_REGS (ZYNQ_SLCR_MMIO_SIZE / 4)
#define TYPE_ZYNQ_SLCR "xilinx,zynq_slcr"
-#define ZYNQ_SLCR(obj) OBJECT_CHECK(ZynqSLCRState, (obj), TYPE_ZYNQ_SLCR)
+typedef struct ZynqSLCRState ZynqSLCRState;
+DECLARE_INSTANCE_CHECKER(ZynqSLCRState, ZYNQ_SLCR,
+ TYPE_ZYNQ_SLCR)
-typedef struct ZynqSLCRState {
+struct ZynqSLCRState {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -194,7 +197,7 @@ typedef struct ZynqSLCRState {
Clock *ps_clk;
Clock *uart0_ref_clk;
Clock *uart1_ref_clk;
-} ZynqSLCRState;
+};
/*
* return the output frequency of ARM/DDR/IO pll