tests/qtest/fuzz: Fix build failure
[qemu/kevin.git] / hw / nubus / mac-nubus-bridge.c
blob7c329300b82c0d4ddbed26b04d5dde6e05f461f8
1 /*
2 * Copyright (c) 2013-2018 Laurent Vivier <laurent@vivier.eu>
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
7 */
9 #include "qemu/osdep.h"
10 #include "hw/sysbus.h"
11 #include "hw/nubus/mac-nubus-bridge.h"
14 static void mac_nubus_bridge_init(Object *obj)
16 MacNubusState *s = MAC_NUBUS_BRIDGE(obj);
17 SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
19 s->bus = NUBUS_BUS(qbus_create(TYPE_NUBUS_BUS, DEVICE(s), NULL));
21 sysbus_init_mmio(sbd, &s->bus->super_slot_io);
22 sysbus_init_mmio(sbd, &s->bus->slot_io);
25 static void mac_nubus_bridge_class_init(ObjectClass *klass, void *data)
27 DeviceClass *dc = DEVICE_CLASS(klass);
29 dc->desc = "Nubus bridge";
32 static const TypeInfo mac_nubus_bridge_info = {
33 .name = TYPE_MAC_NUBUS_BRIDGE,
34 .parent = TYPE_NUBUS_BRIDGE,
35 .instance_init = mac_nubus_bridge_init,
36 .instance_size = sizeof(MacNubusState),
37 .class_init = mac_nubus_bridge_class_init,
40 static void mac_nubus_bridge_register_types(void)
42 type_register_static(&mac_nubus_bridge_info);
45 type_init(mac_nubus_bridge_register_types)