diff options
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r-- | hw/sun4u.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c index f3bb226880..79bbd495eb 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -573,15 +573,16 @@ static void ebus_class_init(ObjectClass *klass, void *data) k->class_id = PCI_CLASS_BRIDGE_OTHER; } -static DeviceInfo ebus_info = { - .name = "ebus", - .size = sizeof(EbusState), - .class_init = ebus_class_init, +static TypeInfo ebus_info = { + .name = "ebus", + .parent = TYPE_PCI_DEVICE, + .instance_size = sizeof(EbusState), + .class_init = ebus_class_init, }; static void pci_ebus_register(void) { - pci_qdev_register(&ebus_info); + type_register_static(&ebus_info); } device_init(pci_ebus_register); @@ -649,21 +650,23 @@ static Property prom_properties[] = { static void prom_class_init(ObjectClass *klass, void *data) { + DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); k->init = prom_init1; + dc->props = prom_properties; } -static DeviceInfo prom_info = { - .name = "openprom", - .size = sizeof(PROMState), - .props = prom_properties, - .class_init = prom_class_init, +static TypeInfo prom_info = { + .name = "openprom", + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(PROMState), + .class_init = prom_class_init, }; static void prom_register_devices(void) { - sysbus_register_withprop(&prom_info); + type_register_static(&prom_info); } device_init(prom_register_devices); @@ -711,21 +714,23 @@ static Property ram_properties[] = { static void ram_class_init(ObjectClass *klass, void *data) { + DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); k->init = ram_init1; + dc->props = ram_properties; } -static DeviceInfo ram_info = { - .name = "memory", - .size = sizeof(RamDevice), - .props = ram_properties, - .class_init = ram_class_init, +static TypeInfo ram_info = { + .name = "memory", + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(RamDevice), + .class_init = ram_class_init, }; static void ram_register_devices(void) { - sysbus_register_withprop(&ram_info); + type_register_static(&ram_info); } device_init(ram_register_devices); |