sysbus_connect_irq(s, i, pic[i]);
}
- pci_create_simple(d->bus, 0, "pbm");
+ pci_create_simple(d->bus, 0, "pbm-pci");
/* APB secondary busses */
pci_dev = pci_create_multifunction(d->bus, PCI_DEVFN(1, 0), true,
}
static DeviceInfo pbm_pci_host_info = {
- .name = "pbm",
+ .name = "pbm-pci",
.size = sizeof(PCIDevice),
.class_init = pbm_pci_host_class_init,
};
}
static DeviceInfo pci_dec_21154_device_info = {
- .name = "dec-21154",
+ .name = "dec-21154-sysbus",
.size = sizeof(DECState),
.class_init = pci_dec_21154_device_class_init,
};
}
static DeviceInfo spapr_main_pci_host_info = {
- .name = "spapr-pci-host-bridge",
+ .name = "spapr-pci-host-bridge-pci",
.size = sizeof(PCIDevice),
.class_init = spapr_main_pci_host_class_init,
};
g_assert(info->name != NULL);
+ if (type_table_lookup(info->name) != NULL) {
+ fprintf(stderr, "Registering `%s' which already exists\n", info->name);
+ abort();
+ }
+
ti->name = g_strdup(info->name);
ti->parent = g_strdup(info->parent);