aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi/xilinx_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ssi/xilinx_spi.c')
-rw-r--r--hw/ssi/xilinx_spi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index 80d1488dc7..34fc8da69a 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -34,6 +34,7 @@
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/ssi/ssi.h"
+#include "qom/object.h"
#ifdef XILINX_SPI_ERR_DEBUG
#define DB_PRINT(...) do { \
@@ -78,9 +79,11 @@
#define FIFO_CAPACITY 256
#define TYPE_XILINX_SPI "xlnx.xps-spi"
-#define XILINX_SPI(obj) OBJECT_CHECK(XilinxSPI, (obj), TYPE_XILINX_SPI)
+typedef struct XilinxSPI XilinxSPI;
+DECLARE_INSTANCE_CHECKER(XilinxSPI, XILINX_SPI,
+ TYPE_XILINX_SPI)
-typedef struct XilinxSPI {
+struct XilinxSPI {
SysBusDevice parent_obj;
MemoryRegion mmio;
@@ -97,7 +100,7 @@ typedef struct XilinxSPI {
Fifo8 tx_fifo;
uint32_t regs[R_MAX];
-} XilinxSPI;
+};
static void txfifo_reset(XilinxSPI *s)
{