diff options
Diffstat (limited to 'hw/m68k')
-rw-r--r-- | hw/m68k/mcf_intc.c | 9 | ||||
-rw-r--r-- | hw/m68k/next-cube.c | 9 | ||||
-rw-r--r-- | hw/m68k/next-kbd.c | 9 | ||||
-rw-r--r-- | hw/m68k/q800.c | 2 |
4 files changed, 19 insertions, 10 deletions
diff --git a/hw/m68k/mcf_intc.c b/hw/m68k/mcf_intc.c index e01e2e111b..7ee447240b 100644 --- a/hw/m68k/mcf_intc.c +++ b/hw/m68k/mcf_intc.c @@ -15,11 +15,14 @@ #include "hw/irq.h" #include "hw/sysbus.h" #include "hw/m68k/mcf.h" +#include "qom/object.h" #define TYPE_MCF_INTC "mcf-intc" -#define MCF_INTC(obj) OBJECT_CHECK(mcf_intc_state, (obj), TYPE_MCF_INTC) +typedef struct mcf_intc_state mcf_intc_state; +DECLARE_INSTANCE_CHECKER(mcf_intc_state, MCF_INTC, + TYPE_MCF_INTC) -typedef struct { +struct mcf_intc_state { SysBusDevice parent_obj; MemoryRegion iomem; @@ -30,7 +33,7 @@ typedef struct { uint8_t icr[64]; M68kCPU *cpu; int active_vector; -} mcf_intc_state; +}; static void mcf_intc_update(mcf_intc_state *s) { diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index d3f25cd6d7..cbd913b0a2 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -21,6 +21,7 @@ #include "hw/loader.h" #include "hw/scsi/esp.h" #include "hw/sysbus.h" +#include "qom/object.h" #include "hw/char/escc.h" /* ZILOG 8530 Serial Emulation */ #include "hw/block/fdc.h" #include "hw/qdev-properties.h" @@ -37,7 +38,9 @@ #endif #define TYPE_NEXT_MACHINE MACHINE_TYPE_NAME("next-cube") -#define NEXT_MACHINE(obj) OBJECT_CHECK(NeXTState, (obj), TYPE_NEXT_MACHINE) +typedef struct NeXTState NeXTState; +DECLARE_INSTANCE_CHECKER(NeXTState, NEXT_MACHINE, + TYPE_NEXT_MACHINE) #define ENTRY 0x0100001e #define RAM_SIZE 0x4000000 @@ -69,7 +72,7 @@ typedef struct NextRtc { uint8_t retval; } NextRtc; -typedef struct { +struct NeXTState { MachineState parent; uint32_t int_mask; @@ -87,7 +90,7 @@ typedef struct { uint32_t scr2; NextRtc rtc; -} NeXTState; +}; /* Thanks to NeXT forums for this */ /* diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c index 2dff87be15..c7ca3fbbc9 100644 --- a/hw/m68k/next-kbd.c +++ b/hw/m68k/next-kbd.c @@ -36,8 +36,11 @@ #include "ui/console.h" #include "sysemu/sysemu.h" #include "migration/vmstate.h" +#include "qom/object.h" -#define NEXTKBD(obj) OBJECT_CHECK(NextKBDState, (obj), TYPE_NEXTKBD) +typedef struct NextKBDState NextKBDState; +DECLARE_INSTANCE_CHECKER(NextKBDState, NEXTKBD, + TYPE_NEXTKBD) /* following defintions from next68k netbsd */ #define CSR_INT 0x00800000 @@ -63,12 +66,12 @@ typedef struct { } KBDQueue; -typedef struct NextKBDState { +struct NextKBDState { SysBusDevice sbd; MemoryRegion mr; KBDQueue queue; uint16_t shift; -} NextKBDState; +}; static void queue_code(void *opaque, int code); diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 1ca482ad81..ce4b47c3e3 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -290,7 +290,7 @@ static void q800_init(MachineState *machine) /* SCSI */ dev = qdev_new(TYPE_ESP); - sysbus_esp = ESP_STATE(dev); + sysbus_esp = ESP(dev); esp = &sysbus_esp->esp; esp->dma_memory_read = NULL; esp->dma_memory_write = NULL; |