aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ssi
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/ssi')
-rw-r--r--include/hw/ssi/aspeed_smc.h7
-rw-r--r--include/hw/ssi/imx_spi.h3
-rw-r--r--include/hw/ssi/mss-spi.h3
-rw-r--r--include/hw/ssi/pl022.h3
-rw-r--r--include/hw/ssi/ssi.h8
-rw-r--r--include/hw/ssi/stm32f2xx_spi.h4
-rw-r--r--include/hw/ssi/xilinx_spips.h20
7 files changed, 20 insertions, 28 deletions
diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h
index a2072ffeea..8e023d8ff6 100644
--- a/include/hw/ssi/aspeed_smc.h
+++ b/include/hw/ssi/aspeed_smc.h
@@ -70,11 +70,8 @@ typedef struct AspeedSMCFlash {
#define TYPE_ASPEED_SMC "aspeed.smc"
typedef struct AspeedSMCClass AspeedSMCClass;
typedef struct AspeedSMCState AspeedSMCState;
-#define ASPEED_SMC(obj) OBJECT_CHECK(AspeedSMCState, (obj), TYPE_ASPEED_SMC)
-#define ASPEED_SMC_CLASS(klass) \
- OBJECT_CLASS_CHECK(AspeedSMCClass, (klass), TYPE_ASPEED_SMC)
-#define ASPEED_SMC_GET_CLASS(obj) \
- OBJECT_GET_CLASS(AspeedSMCClass, (obj), TYPE_ASPEED_SMC)
+DECLARE_OBJ_CHECKERS(AspeedSMCState, AspeedSMCClass,
+ ASPEED_SMC, TYPE_ASPEED_SMC)
struct AspeedSMCClass {
SysBusDevice parent_obj;
diff --git a/include/hw/ssi/imx_spi.h b/include/hw/ssi/imx_spi.h
index 3a966af0ec..874fea492d 100644
--- a/include/hw/ssi/imx_spi.h
+++ b/include/hw/ssi/imx_spi.h
@@ -79,7 +79,8 @@
#define TYPE_IMX_SPI "imx.spi"
typedef struct IMXSPIState IMXSPIState;
-#define IMX_SPI(obj) OBJECT_CHECK(IMXSPIState, (obj), TYPE_IMX_SPI)
+DECLARE_INSTANCE_CHECKER(IMXSPIState, IMX_SPI,
+ TYPE_IMX_SPI)
struct IMXSPIState {
/* <private> */
diff --git a/include/hw/ssi/mss-spi.h b/include/hw/ssi/mss-spi.h
index 40e1a5ac90..7c16cf6b49 100644
--- a/include/hw/ssi/mss-spi.h
+++ b/include/hw/ssi/mss-spi.h
@@ -32,7 +32,8 @@
#define TYPE_MSS_SPI "mss-spi"
typedef struct MSSSpiState MSSSpiState;
-#define MSS_SPI(obj) OBJECT_CHECK(MSSSpiState, (obj), TYPE_MSS_SPI)
+DECLARE_INSTANCE_CHECKER(MSSSpiState, MSS_SPI,
+ TYPE_MSS_SPI)
#define R_SPI_MAX 16
diff --git a/include/hw/ssi/pl022.h b/include/hw/ssi/pl022.h
index 64aeb61eef..1f5da7cc44 100644
--- a/include/hw/ssi/pl022.h
+++ b/include/hw/ssi/pl022.h
@@ -26,7 +26,8 @@
#define TYPE_PL022 "pl022"
typedef struct PL022State PL022State;
-#define PL022(obj) OBJECT_CHECK(PL022State, (obj), TYPE_PL022)
+DECLARE_INSTANCE_CHECKER(PL022State, PL022,
+ TYPE_PL022)
struct PL022State {
SysBusDevice parent_obj;
diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h
index b42765f415..b9286989fc 100644
--- a/include/hw/ssi/ssi.h
+++ b/include/hw/ssi/ssi.h
@@ -19,12 +19,8 @@ typedef struct SSISlaveClass SSISlaveClass;
typedef enum SSICSMode SSICSMode;
#define TYPE_SSI_SLAVE "ssi-slave"
-#define SSI_SLAVE(obj) \
- OBJECT_CHECK(SSISlave, (obj), TYPE_SSI_SLAVE)
-#define SSI_SLAVE_CLASS(klass) \
- OBJECT_CLASS_CHECK(SSISlaveClass, (klass), TYPE_SSI_SLAVE)
-#define SSI_SLAVE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(SSISlaveClass, (obj), TYPE_SSI_SLAVE)
+DECLARE_OBJ_CHECKERS(SSISlave, SSISlaveClass,
+ SSI_SLAVE, TYPE_SSI_SLAVE)
#define SSI_GPIO_CS "ssi-gpio-cs"
diff --git a/include/hw/ssi/stm32f2xx_spi.h b/include/hw/ssi/stm32f2xx_spi.h
index 1c8ff7d724..4bb36d04ed 100644
--- a/include/hw/ssi/stm32f2xx_spi.h
+++ b/include/hw/ssi/stm32f2xx_spi.h
@@ -46,8 +46,8 @@
#define TYPE_STM32F2XX_SPI "stm32f2xx-spi"
typedef struct STM32F2XXSPIState STM32F2XXSPIState;
-#define STM32F2XX_SPI(obj) \
- OBJECT_CHECK(STM32F2XXSPIState, (obj), TYPE_STM32F2XX_SPI)
+DECLARE_INSTANCE_CHECKER(STM32F2XXSPIState, STM32F2XX_SPI,
+ TYPE_STM32F2XX_SPI)
struct STM32F2XXSPIState {
/* <private> */
diff --git a/include/hw/ssi/xilinx_spips.h b/include/hw/ssi/xilinx_spips.h
index 2171018601..b1ab347617 100644
--- a/include/hw/ssi/xilinx_spips.h
+++ b/include/hw/ssi/xilinx_spips.h
@@ -136,17 +136,13 @@ typedef struct XilinxSPIPSClass XilinxSPIPSClass;
#define TYPE_XILINX_QSPIPS "xlnx.ps7-qspi"
#define TYPE_XLNX_ZYNQMP_QSPIPS "xlnx.usmp-gqspi"
-#define XILINX_SPIPS(obj) \
- OBJECT_CHECK(XilinxSPIPS, (obj), TYPE_XILINX_SPIPS)
-#define XILINX_SPIPS_CLASS(klass) \
- OBJECT_CLASS_CHECK(XilinxSPIPSClass, (klass), TYPE_XILINX_SPIPS)
-#define XILINX_SPIPS_GET_CLASS(obj) \
- OBJECT_GET_CLASS(XilinxSPIPSClass, (obj), TYPE_XILINX_SPIPS)
-
-#define XILINX_QSPIPS(obj) \
- OBJECT_CHECK(XilinxQSPIPS, (obj), TYPE_XILINX_QSPIPS)
-
-#define XLNX_ZYNQMP_QSPIPS(obj) \
- OBJECT_CHECK(XlnxZynqMPQSPIPS, (obj), TYPE_XLNX_ZYNQMP_QSPIPS)
+DECLARE_OBJ_CHECKERS(XilinxSPIPS, XilinxSPIPSClass,
+ XILINX_SPIPS, TYPE_XILINX_SPIPS)
+
+DECLARE_INSTANCE_CHECKER(XilinxQSPIPS, XILINX_QSPIPS,
+ TYPE_XILINX_QSPIPS)
+
+DECLARE_INSTANCE_CHECKER(XlnxZynqMPQSPIPS, XLNX_ZYNQMP_QSPIPS,
+ TYPE_XLNX_ZYNQMP_QSPIPS)
#endif /* XILINX_SPIPS_H */