k->device_id = PCI_DEVICE_ID_HITACHI_SH7751R;
}
-static DeviceInfo sh_pci_host_info = {
- .name = "sh_pci_host",
- .size = sizeof(PCIDevice),
- .class_init = sh_pci_host_class_init,
+static TypeInfo sh_pci_host_info = {
+ .name = "sh_pci_host",
+ .parent = TYPE_PCI_DEVICE,
+ .instance_size = sizeof(PCIDevice),
+ .class_init = sh_pci_host_class_init,
};
static void sh_pci_device_class_init(ObjectClass *klass, void *data)
sdc->init = sh_pci_device_init;
}
-static DeviceInfo sh_pci_device_info = {
- .name = "sh_pci",
- .size = sizeof(SHPCIState),
- .class_init = sh_pci_device_class_init,
+static TypeInfo sh_pci_device_info = {
+ .name = "sh_pci",
+ .parent = TYPE_SYS_BUS_DEVICE,
+ .instance_size = sizeof(SHPCIState),
+ .class_init = sh_pci_device_class_init,
};
-static void sh_pci_register_devices(void)
+static void sh_pci_register_types(void)
{
- sysbus_qdev_register(&sh_pci_device_info);
- pci_qdev_register(&sh_pci_host_info);
+ type_register_static(&sh_pci_device_info);
+ type_register_static(&sh_pci_host_info);
}
-device_init(sh_pci_register_devices)
+type_init(sh_pci_register_types)