aboutsummaryrefslogtreecommitdiff
path: root/include/hw/arm
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-16 14:25:19 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 14:12:32 -0400
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /include/hw/arm
parenta489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff)
downloadqemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip
qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz
qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.bz2
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
This converts existing DECLARE_INSTANCE_CHECKER usage to OBJECT_DECLARE_SIMPLE_TYPE when possible. $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Paul Durrant <paul@xen.org> Message-Id: <20200916182519.415636-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/arm')
-rw-r--r--include/hw/arm/allwinner-a10.h4
-rw-r--r--include/hw/arm/allwinner-h3.h4
-rw-r--r--include/hw/arm/armv7m.h8
-rw-r--r--include/hw/arm/bcm2835_peripherals.h4
-rw-r--r--include/hw/arm/digic.h4
-rw-r--r--include/hw/arm/exynos4210.h4
-rw-r--r--include/hw/arm/fsl-imx25.h4
-rw-r--r--include/hw/arm/fsl-imx31.h4
-rw-r--r--include/hw/arm/fsl-imx6.h4
-rw-r--r--include/hw/arm/fsl-imx6ul.h4
-rw-r--r--include/hw/arm/fsl-imx7.h4
-rw-r--r--include/hw/arm/msf2-soc.h4
-rw-r--r--include/hw/arm/nrf51_soc.h4
-rw-r--r--include/hw/arm/omap.h4
-rw-r--r--include/hw/arm/pxa.h15
-rw-r--r--include/hw/arm/stm32f205_soc.h4
-rw-r--r--include/hw/arm/stm32f405_soc.h4
-rw-r--r--include/hw/arm/xlnx-versal.h4
-rw-r--r--include/hw/arm/xlnx-zynqmp.h4
19 files changed, 23 insertions, 68 deletions
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index d13b6cf..a76dc7b 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -22,9 +22,7 @@
#define AW_A10_NUM_USB 2
#define TYPE_AW_A10 "allwinner-a10"
-typedef struct AwA10State AwA10State;
-DECLARE_INSTANCE_CHECKER(AwA10State, AW_A10,
- TYPE_AW_A10)
+OBJECT_DECLARE_SIMPLE_TYPE(AwA10State, AW_A10)
struct AwA10State {
/*< private >*/
diff --git a/include/hw/arm/allwinner-h3.h b/include/hw/arm/allwinner-h3.h
index a93e019..cc308a5 100644
--- a/include/hw/arm/allwinner-h3.h
+++ b/include/hw/arm/allwinner-h3.h
@@ -106,9 +106,7 @@ enum {
#define TYPE_AW_H3 "allwinner-h3"
/** Convert input object to Allwinner H3 state object */
-typedef struct AwH3State AwH3State;
-DECLARE_INSTANCE_CHECKER(AwH3State, AW_H3,
- TYPE_AW_H3)
+OBJECT_DECLARE_SIMPLE_TYPE(AwH3State, AW_H3)
/** @} */
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index dcb891d..0791dcb 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -16,9 +16,7 @@
#include "qom/object.h"
#define TYPE_BITBAND "ARM,bitband-memory"
-typedef struct BitBandState BitBandState;
-DECLARE_INSTANCE_CHECKER(BitBandState, BITBAND,
- TYPE_BITBAND)
+OBJECT_DECLARE_SIMPLE_TYPE(BitBandState, BITBAND)
struct BitBandState {
/*< private >*/
@@ -32,9 +30,7 @@ struct BitBandState {
};
#define TYPE_ARMV7M "armv7m"
-typedef struct ARMv7MState ARMv7MState;
-DECLARE_INSTANCE_CHECKER(ARMv7MState, ARMV7M,
- TYPE_ARMV7M)
+OBJECT_DECLARE_SIMPLE_TYPE(ARMv7MState, ARMV7M)
#define ARMV7M_NUM_BITBANDS 2
diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h
index b4d3ae1..13d7c4c 100644
--- a/include/hw/arm/bcm2835_peripherals.h
+++ b/include/hw/arm/bcm2835_peripherals.h
@@ -32,9 +32,7 @@
#include "qom/object.h"
#define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals"
-typedef struct BCM2835PeripheralState BCM2835PeripheralState;
-DECLARE_INSTANCE_CHECKER(BCM2835PeripheralState, BCM2835_PERIPHERALS,
- TYPE_BCM2835_PERIPHERALS)
+OBJECT_DECLARE_SIMPLE_TYPE(BCM2835PeripheralState, BCM2835_PERIPHERALS)
struct BCM2835PeripheralState {
/*< private >*/
diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
index f3ba398..8f2735c 100644
--- a/include/hw/arm/digic.h
+++ b/include/hw/arm/digic.h
@@ -25,9 +25,7 @@
#define TYPE_DIGIC "digic"
-typedef struct DigicState DigicState;
-DECLARE_INSTANCE_CHECKER(DigicState, DIGIC,
- TYPE_DIGIC)
+OBJECT_DECLARE_SIMPLE_TYPE(DigicState, DIGIC)
#define DIGIC4_NB_TIMERS 3
diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h
index c2de1dc..60b9e12 100644
--- a/include/hw/arm/exynos4210.h
+++ b/include/hw/arm/exynos4210.h
@@ -103,11 +103,9 @@ struct Exynos4210State {
I2CBus *i2c_if[EXYNOS4210_I2C_NUMBER];
qemu_or_irq pl330_irq_orgate[EXYNOS4210_NUM_DMA];
};
-typedef struct Exynos4210State Exynos4210State;
#define TYPE_EXYNOS4210_SOC "exynos4210"
-DECLARE_INSTANCE_CHECKER(Exynos4210State, EXYNOS4210_SOC,
- TYPE_EXYNOS4210_SOC)
+OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210State, EXYNOS4210_SOC)
void exynos4210_write_secondary(ARMCPU *cpu,
const struct arm_boot_info *info);
diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h
index e239505..971f35d 100644
--- a/include/hw/arm/fsl-imx25.h
+++ b/include/hw/arm/fsl-imx25.h
@@ -35,9 +35,7 @@
#include "qom/object.h"
#define TYPE_FSL_IMX25 "fsl,imx25"
-typedef struct FslIMX25State FslIMX25State;
-DECLARE_INSTANCE_CHECKER(FslIMX25State, FSL_IMX25,
- TYPE_FSL_IMX25)
+OBJECT_DECLARE_SIMPLE_TYPE(FslIMX25State, FSL_IMX25)
#define FSL_IMX25_NUM_UARTS 5
#define FSL_IMX25_NUM_GPTS 4
diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h
index 64b4ca0..b9792d5 100644
--- a/include/hw/arm/fsl-imx31.h
+++ b/include/hw/arm/fsl-imx31.h
@@ -31,9 +31,7 @@
#include "qom/object.h"
#define TYPE_FSL_IMX31 "fsl,imx31"
-typedef struct FslIMX31State FslIMX31State;
-DECLARE_INSTANCE_CHECKER(FslIMX31State, FSL_IMX31,
- TYPE_FSL_IMX31)
+OBJECT_DECLARE_SIMPLE_TYPE(FslIMX31State, FSL_IMX31)
#define FSL_IMX31_NUM_UARTS 2
#define FSL_IMX31_NUM_EPITS 2
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index 602b9af..29cc425 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -37,9 +37,7 @@
#include "qom/object.h"
#define TYPE_FSL_IMX6 "fsl,imx6"
-typedef struct FslIMX6State FslIMX6State;
-DECLARE_INSTANCE_CHECKER(FslIMX6State, FSL_IMX6,
- TYPE_FSL_IMX6)
+OBJECT_DECLARE_SIMPLE_TYPE(FslIMX6State, FSL_IMX6)
#define FSL_IMX6_NUM_CPUS 4
#define FSL_IMX6_NUM_UARTS 5
diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h
index e4862fd..f8ebfba 100644
--- a/include/hw/arm/fsl-imx6ul.h
+++ b/include/hw/arm/fsl-imx6ul.h
@@ -41,9 +41,7 @@
#include "qom/object.h"
#define TYPE_FSL_IMX6UL "fsl,imx6ul"
-typedef struct FslIMX6ULState FslIMX6ULState;
-DECLARE_INSTANCE_CHECKER(FslIMX6ULState, FSL_IMX6UL,
- TYPE_FSL_IMX6UL)
+OBJECT_DECLARE_SIMPLE_TYPE(FslIMX6ULState, FSL_IMX6UL)
enum FslIMX6ULConfiguration {
FSL_IMX6UL_NUM_CPUS = 1,
diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h
index 434d1d0..161fdc3 100644
--- a/include/hw/arm/fsl-imx7.h
+++ b/include/hw/arm/fsl-imx7.h
@@ -42,9 +42,7 @@
#include "qom/object.h"
#define TYPE_FSL_IMX7 "fsl,imx7"
-typedef struct FslIMX7State FslIMX7State;
-DECLARE_INSTANCE_CHECKER(FslIMX7State, FSL_IMX7,
- TYPE_FSL_IMX7)
+OBJECT_DECLARE_SIMPLE_TYPE(FslIMX7State, FSL_IMX7)
enum FslIMX7Configuration {
FSL_IMX7_NUM_CPUS = 2,
diff --git a/include/hw/arm/msf2-soc.h b/include/hw/arm/msf2-soc.h
index 9b93d0d..d406184 100644
--- a/include/hw/arm/msf2-soc.h
+++ b/include/hw/arm/msf2-soc.h
@@ -33,9 +33,7 @@
#include "qom/object.h"
#define TYPE_MSF2_SOC "msf2-soc"
-typedef struct MSF2State MSF2State;
-DECLARE_INSTANCE_CHECKER(MSF2State, MSF2_SOC,
- TYPE_MSF2_SOC)
+OBJECT_DECLARE_SIMPLE_TYPE(MSF2State, MSF2_SOC)
#define MSF2_NUM_SPIS 2
#define MSF2_NUM_UARTS 2
diff --git a/include/hw/arm/nrf51_soc.h b/include/hw/arm/nrf51_soc.h
index b69492b..f8a6725 100644
--- a/include/hw/arm/nrf51_soc.h
+++ b/include/hw/arm/nrf51_soc.h
@@ -20,9 +20,7 @@
#include "qom/object.h"
#define TYPE_NRF51_SOC "nrf51-soc"
-typedef struct NRF51State NRF51State;
-DECLARE_INSTANCE_CHECKER(NRF51State, NRF51_SOC,
- TYPE_NRF51_SOC)
+OBJECT_DECLARE_SIMPLE_TYPE(NRF51State, NRF51_SOC)
#define NRF51_NUM_TIMERS 3
diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h
index 0dbf171..ff6a173 100644
--- a/include/hw/arm/omap.h
+++ b/include/hw/arm/omap.h
@@ -94,9 +94,7 @@ void omap_intc_set_fclk(omap_intr_handler *intc, omap_clk clk);
/* omap_i2c.c */
#define TYPE_OMAP_I2C "omap_i2c"
-typedef struct OMAPI2CState OMAPI2CState;
-DECLARE_INSTANCE_CHECKER(OMAPI2CState, OMAP_I2C,
- TYPE_OMAP_I2C)
+OBJECT_DECLARE_SIMPLE_TYPE(OMAPI2CState, OMAP_I2C)
/* TODO: clock framework (see above) */
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index 9046876..1095504 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -88,9 +88,7 @@ void pxa2xx_lcd_vsync_notifier(PXA2xxLCDState *s, qemu_irq handler);
/* pxa2xx_mmci.c */
#define TYPE_PXA2XX_MMCI "pxa2xx-mmci"
-typedef struct PXA2xxMMCIState PXA2xxMMCIState;
-DECLARE_INSTANCE_CHECKER(PXA2xxMMCIState, PXA2XX_MMCI,
- TYPE_PXA2XX_MMCI)
+OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxMMCIState, PXA2XX_MMCI)
PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
hwaddr base,
@@ -100,9 +98,7 @@ void pxa2xx_mmci_handlers(PXA2xxMMCIState *s, qemu_irq readonly,
/* pxa2xx_pcmcia.c */
#define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia"
-typedef struct PXA2xxPCMCIAState PXA2xxPCMCIAState;
-DECLARE_INSTANCE_CHECKER(PXA2xxPCMCIAState, PXA2XX_PCMCIA,
- TYPE_PXA2XX_PCMCIA)
+OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxPCMCIAState, PXA2XX_PCMCIA)
PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,
hwaddr base);
@@ -130,13 +126,10 @@ I2CBus *pxa2xx_i2c_bus(PXA2xxI2CState *s);
#define TYPE_PXA2XX_I2C "pxa2xx_i2c"
typedef struct PXA2xxI2SState PXA2xxI2SState;
-DECLARE_INSTANCE_CHECKER(PXA2xxI2CState, PXA2XX_I2C,
- TYPE_PXA2XX_I2C)
+OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxI2CState, PXA2XX_I2C)
#define TYPE_PXA2XX_FIR "pxa2xx-fir"
-typedef struct PXA2xxFIrState PXA2xxFIrState;
-DECLARE_INSTANCE_CHECKER(PXA2xxFIrState, PXA2XX_FIR,
- TYPE_PXA2XX_FIR)
+OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxFIrState, PXA2XX_FIR)
typedef struct {
ARMCPU *cpu;
diff --git a/include/hw/arm/stm32f205_soc.h b/include/hw/arm/stm32f205_soc.h
index 9c2f481..985ff63 100644
--- a/include/hw/arm/stm32f205_soc.h
+++ b/include/hw/arm/stm32f205_soc.h
@@ -35,9 +35,7 @@
#include "qom/object.h"
#define TYPE_STM32F205_SOC "stm32f205-soc"
-typedef struct STM32F205State STM32F205State;
-DECLARE_INSTANCE_CHECKER(STM32F205State, STM32F205_SOC,
- TYPE_STM32F205_SOC)
+OBJECT_DECLARE_SIMPLE_TYPE(STM32F205State, STM32F205_SOC)
#define STM_NUM_USARTS 6
#define STM_NUM_TIMERS 4
diff --git a/include/hw/arm/stm32f405_soc.h b/include/hw/arm/stm32f405_soc.h
index f1a2276..347105e 100644
--- a/include/hw/arm/stm32f405_soc.h
+++ b/include/hw/arm/stm32f405_soc.h
@@ -36,9 +36,7 @@
#include "qom/object.h"
#define TYPE_STM32F405_SOC "stm32f405-soc"
-typedef struct STM32F405State STM32F405State;
-DECLARE_INSTANCE_CHECKER(STM32F405State, STM32F405_SOC,
- TYPE_STM32F405_SOC)
+OBJECT_DECLARE_SIMPLE_TYPE(STM32F405State, STM32F405_SOC)
#define STM_NUM_USARTS 7
#define STM_NUM_TIMERS 4
diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h
index eaa9023..8ce8e63 100644
--- a/include/hw/arm/xlnx-versal.h
+++ b/include/hw/arm/xlnx-versal.h
@@ -23,9 +23,7 @@
#include "qom/object.h"
#define TYPE_XLNX_VERSAL "xlnx-versal"
-typedef struct Versal Versal;
-DECLARE_INSTANCE_CHECKER(Versal, XLNX_VERSAL,
- TYPE_XLNX_VERSAL)
+OBJECT_DECLARE_SIMPLE_TYPE(Versal, XLNX_VERSAL)
#define XLNX_VERSAL_NR_ACPUS 2
#define XLNX_VERSAL_NR_UARTS 2
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index 4cc97b4..567d0db 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -35,9 +35,7 @@
#include "qom/object.h"
#define TYPE_XLNX_ZYNQMP "xlnx,zynqmp"
-typedef struct XlnxZynqMPState XlnxZynqMPState;
-DECLARE_INSTANCE_CHECKER(XlnxZynqMPState, XLNX_ZYNQMP,
- TYPE_XLNX_ZYNQMP)
+OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPState, XLNX_ZYNQMP)
#define XLNX_ZYNQMP_NUM_APU_CPUS 4
#define XLNX_ZYNQMP_NUM_RPU_CPUS 2