diff options
-rw-r--r-- | hw/m68k/q800.c | 2 | ||||
-rw-r--r-- | hw/nubus/mac-nubus-bridge.c | 9 | ||||
-rw-r--r-- | hw/nubus/nubus-bridge.c | 3 | ||||
-rw-r--r-- | include/hw/nubus/nubus.h | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 9bdea1a..074acf4 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -398,7 +398,7 @@ static void q800_init(MachineState *machine) sysbus_mmio_map(SYS_BUS_DEVICE(dev), 1, NUBUS_SLOT_BASE + MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE); - nubus = NUBUS_BRIDGE(dev)->bus; + nubus = &NUBUS_BRIDGE(dev)->bus; /* framebuffer in nubus slot #9 */ diff --git a/hw/nubus/mac-nubus-bridge.c b/hw/nubus/mac-nubus-bridge.c index db8640e..a0da5a8 100644 --- a/hw/nubus/mac-nubus-bridge.c +++ b/hw/nubus/mac-nubus-bridge.c @@ -18,19 +18,20 @@ static void mac_nubus_bridge_init(Object *obj) MacNubusBridge *s = MAC_NUBUS_BRIDGE(obj); NubusBridge *nb = NUBUS_BRIDGE(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); + NubusBus *bus = &nb->bus; /* Macintosh only has slots 0x9 to 0xe available */ - nb->bus->slot_available_mask = MAKE_64BIT_MASK(MAC_NUBUS_FIRST_SLOT, - MAC_NUBUS_SLOT_NB); + bus->slot_available_mask = MAKE_64BIT_MASK(MAC_NUBUS_FIRST_SLOT, + MAC_NUBUS_SLOT_NB); /* Aliases for slots 0x9 to 0xe */ memory_region_init_alias(&s->super_slot_alias, obj, "super-slot-alias", - &nb->bus->nubus_mr, + &bus->nubus_mr, MAC_NUBUS_FIRST_SLOT * NUBUS_SUPER_SLOT_SIZE, MAC_NUBUS_SLOT_NB * NUBUS_SUPER_SLOT_SIZE); memory_region_init_alias(&s->slot_alias, obj, "slot-alias", - &nb->bus->nubus_mr, + &bus->nubus_mr, NUBUS_SLOT_BASE + MAC_NUBUS_FIRST_SLOT * NUBUS_SLOT_SIZE, MAC_NUBUS_SLOT_NB * NUBUS_SLOT_SIZE); diff --git a/hw/nubus/nubus-bridge.c b/hw/nubus/nubus-bridge.c index 3b68d44..1adda7f 100644 --- a/hw/nubus/nubus-bridge.c +++ b/hw/nubus/nubus-bridge.c @@ -16,8 +16,9 @@ static void nubus_bridge_init(Object *obj) { NubusBridge *s = NUBUS_BRIDGE(obj); + NubusBus *bus = &s->bus; - s->bus = NUBUS_BUS(qbus_create(TYPE_NUBUS_BUS, DEVICE(s), NULL)); + qbus_create_inplace(bus, sizeof(s->bus), TYPE_NUBUS_BUS, DEVICE(s), NULL); } static void nubus_bridge_class_init(ObjectClass *klass, void *data) diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h index 2d00d18..63c69a7 100644 --- a/include/hw/nubus/nubus.h +++ b/include/hw/nubus/nubus.h @@ -63,7 +63,7 @@ struct NubusDevice { struct NubusBridge { SysBusDevice parent_obj; - NubusBus *bus; + NubusBus bus; }; #endif |