mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
a489d1951c
commit
8063396bf3
505 changed files with 609 additions and 1795 deletions
|
@ -29,9 +29,7 @@
|
|||
#define A9_GTIMER_MAX_CPUS 4
|
||||
|
||||
#define TYPE_A9_GTIMER "arm.cortex-a9-global-timer"
|
||||
typedef struct A9GTimerState A9GTimerState;
|
||||
DECLARE_INSTANCE_CHECKER(A9GTimerState, A9_GTIMER,
|
||||
TYPE_A9_GTIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(A9GTimerState, A9_GTIMER)
|
||||
|
||||
#define R_COUNTER_LO 0x00
|
||||
#define R_COUNTER_HI 0x04
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_AW_A10_PIT "allwinner-A10-timer"
|
||||
typedef struct AwA10PITState AwA10PITState;
|
||||
DECLARE_INSTANCE_CHECKER(AwA10PITState, AW_A10_PIT,
|
||||
TYPE_AW_A10_PIT)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(AwA10PITState, AW_A10_PIT)
|
||||
|
||||
#define AW_A10_PIT_TIMER_NR 6
|
||||
#define AW_A10_PIT_TIMER_IRQ 0x1
|
||||
|
|
|
@ -36,9 +36,7 @@ typedef struct {
|
|||
} TimerBlock;
|
||||
|
||||
#define TYPE_ARM_MPTIMER "arm_mptimer"
|
||||
typedef struct ARMMPTimerState ARMMPTimerState;
|
||||
DECLARE_INSTANCE_CHECKER(ARMMPTimerState, ARM_MPTIMER,
|
||||
TYPE_ARM_MPTIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(ARMMPTimerState, ARM_MPTIMER)
|
||||
|
||||
struct ARMMPTimerState {
|
||||
/*< private >*/
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
#define TYPE_SYSTICK "armv7m_systick"
|
||||
|
||||
typedef struct SysTickState SysTickState;
|
||||
DECLARE_INSTANCE_CHECKER(SysTickState, SYSTICK,
|
||||
TYPE_SYSTICK)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(SysTickState, SYSTICK)
|
||||
|
||||
struct SysTickState {
|
||||
/*< private >*/
|
||||
|
|
|
@ -42,9 +42,7 @@ enum NextInterrupt {
|
|||
};
|
||||
|
||||
#define TYPE_AVR_TIMER16 "avr-timer16"
|
||||
typedef struct AVRTimer16State AVRTimer16State;
|
||||
DECLARE_INSTANCE_CHECKER(AVRTimer16State, AVR_TIMER16,
|
||||
TYPE_AVR_TIMER16)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(AVRTimer16State, AVR_TIMER16)
|
||||
|
||||
struct AVRTimer16State {
|
||||
/* <private> */
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_BCM2835_SYSTIMER "bcm2835-sys-timer"
|
||||
typedef struct BCM2835SystemTimerState BCM2835SystemTimerState;
|
||||
DECLARE_INSTANCE_CHECKER(BCM2835SystemTimerState, BCM2835_SYSTIMER,
|
||||
TYPE_BCM2835_SYSTIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(BCM2835SystemTimerState, BCM2835_SYSTIMER)
|
||||
|
||||
struct BCM2835SystemTimerState {
|
||||
/*< private >*/
|
||||
|
|
|
@ -31,9 +31,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_CMSDK_APB_DUALTIMER "cmsdk-apb-dualtimer"
|
||||
typedef struct CMSDKAPBDualTimer CMSDKAPBDualTimer;
|
||||
DECLARE_INSTANCE_CHECKER(CMSDKAPBDualTimer, CMSDK_APB_DUALTIMER,
|
||||
TYPE_CMSDK_APB_DUALTIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBDualTimer, CMSDK_APB_DUALTIMER)
|
||||
|
||||
|
||||
/* One of the two identical timer modules in the dual-timer module */
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_CMSDK_APB_TIMER "cmsdk-apb-timer"
|
||||
typedef struct CMSDKAPBTIMER CMSDKAPBTIMER;
|
||||
DECLARE_INSTANCE_CHECKER(CMSDKAPBTIMER, CMSDK_APB_TIMER,
|
||||
TYPE_CMSDK_APB_TIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBTIMER, CMSDK_APB_TIMER)
|
||||
|
||||
struct CMSDKAPBTIMER {
|
||||
/*< private >*/
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_DIGIC_TIMER "digic-timer"
|
||||
typedef struct DigicTimerState DigicTimerState;
|
||||
DECLARE_INSTANCE_CHECKER(DigicTimerState, DIGIC_TIMER,
|
||||
TYPE_DIGIC_TIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(DigicTimerState, DIGIC_TIMER)
|
||||
|
||||
#define DIGIC_TIMER_CONTROL 0x00
|
||||
#define DIGIC_TIMER_CONTROL_RST 0x80000000
|
||||
|
|
|
@ -56,9 +56,7 @@
|
|||
#define EPIT_TIMER_MAX 0XFFFFFFFFUL
|
||||
|
||||
#define TYPE_IMX_EPIT "imx.epit"
|
||||
typedef struct IMXEPITState IMXEPITState;
|
||||
DECLARE_INSTANCE_CHECKER(IMXEPITState, IMX_EPIT,
|
||||
TYPE_IMX_EPIT)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(IMXEPITState, IMX_EPIT)
|
||||
|
||||
struct IMXEPITState {
|
||||
/*< private >*/
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_MSS_TIMER "mss-timer"
|
||||
typedef struct MSSTimerState MSSTimerState;
|
||||
DECLARE_INSTANCE_CHECKER(MSSTimerState, MSS_TIMER,
|
||||
TYPE_MSS_TIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(MSSTimerState, MSS_TIMER)
|
||||
|
||||
/*
|
||||
* There are two 32-bit down counting timers.
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
#include "qemu/timer.h"
|
||||
#include "qom/object.h"
|
||||
#define TYPE_NRF51_TIMER "nrf51_soc.timer"
|
||||
typedef struct NRF51TimerState NRF51TimerState;
|
||||
DECLARE_INSTANCE_CHECKER(NRF51TimerState, NRF51_TIMER,
|
||||
TYPE_NRF51_TIMER)
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(NRF51TimerState, NRF51_TIMER)
|
||||
|
||||
#define NRF51_TIMER_REG_COUNT 4
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue