aboutsummaryrefslogtreecommitdiff
path: root/hw/rx
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rx')
-rw-r--r--hw/rx/rx-gdbsim.c19
-rw-r--r--hw/rx/rx62n.c12
2 files changed, 15 insertions, 16 deletions
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 6914de2e59..417ec0564b 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -30,34 +30,33 @@
#include "sysemu/qtest.h"
#include "sysemu/device_tree.h"
#include "hw/boards.h"
+#include "qom/object.h"
/* Same address of GDB integrated simulator */
#define SDRAM_BASE EXT_CS_BASE
-typedef struct RxGdbSimMachineClass {
+struct RxGdbSimMachineClass {
/*< private >*/
MachineClass parent_class;
/*< public >*/
const char *mcu_name;
uint32_t xtal_freq_hz;
-} RxGdbSimMachineClass;
+};
+typedef struct RxGdbSimMachineClass RxGdbSimMachineClass;
-typedef struct RxGdbSimMachineState {
+struct RxGdbSimMachineState {
/*< private >*/
MachineState parent_obj;
/*< public >*/
RX62NState mcu;
-} RxGdbSimMachineState;
+};
+typedef struct RxGdbSimMachineState RxGdbSimMachineState;
#define TYPE_RX_GDBSIM_MACHINE MACHINE_TYPE_NAME("rx62n-common")
-#define RX_GDBSIM_MACHINE(obj) \
- OBJECT_CHECK(RxGdbSimMachineState, (obj), TYPE_RX_GDBSIM_MACHINE)
+DECLARE_OBJ_CHECKERS(RxGdbSimMachineState, RxGdbSimMachineClass,
+ RX_GDBSIM_MACHINE, TYPE_RX_GDBSIM_MACHINE)
-#define RX_GDBSIM_MACHINE_CLASS(klass) \
- OBJECT_CLASS_CHECK(RxGdbSimMachineClass, (klass), TYPE_RX_GDBSIM_MACHINE)
-#define RX_GDBSIM_MACHINE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(RxGdbSimMachineClass, (obj), TYPE_RX_GDBSIM_MACHINE)
static void rx_load_image(RXCPU *cpu, const char *filename,
uint32_t start, uint32_t size)
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index b9c217ebfa..6eb4eea700 100644
--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -31,6 +31,7 @@
#include "sysemu/sysemu.h"
#include "sysemu/qtest.h"
#include "cpu.h"
+#include "qom/object.h"
/*
* RX62N Internal Memory
@@ -60,7 +61,7 @@
#define RX62N_XTAL_MAX_HZ (14 * 1000 * 1000)
#define RX62N_PCLK_MAX_HZ (50 * 1000 * 1000)
-typedef struct RX62NClass {
+struct RX62NClass {
/*< private >*/
DeviceClass parent_class;
/*< public >*/
@@ -68,12 +69,11 @@ typedef struct RX62NClass {
uint64_t ram_size;
uint64_t rom_flash_size;
uint64_t data_flash_size;
-} RX62NClass;
+};
+typedef struct RX62NClass RX62NClass;
-#define RX62N_MCU_CLASS(klass) \
- OBJECT_CLASS_CHECK(RX62NClass, (klass), TYPE_RX62N_MCU)
-#define RX62N_MCU_GET_CLASS(obj) \
- OBJECT_GET_CLASS(RX62NClass, (obj), TYPE_RX62N_MCU)
+DECLARE_CLASS_CHECKERS(RX62NClass, RX62N_MCU,
+ TYPE_RX62N_MCU)
/*
* IRQ -> IPR mapping table