.class_init = pci_bus_class_init,
};
+static const TypeInfo pcie_interface_info = {
+ .name = INTERFACE_PCIE_DEVICE,
+ .parent = TYPE_INTERFACE,
+};
+
+static const TypeInfo conventional_pci_interface_info = {
+ .name = INTERFACE_CONVENTIONAL_PCI_DEVICE,
+ .parent = TYPE_INTERFACE,
+};
+
static const TypeInfo pcie_bus_info = {
.name = TYPE_PCIE_BUS,
.parent = TYPE_PCI_BUS,
{
type_register_static(&pci_bus_info);
type_register_static(&pcie_bus_info);
+ type_register_static(&conventional_pci_interface_info);
+ type_register_static(&pcie_interface_info);
type_register_static(&pci_device_type_info);
}
#define PCI_DEVICE_GET_CLASS(obj) \
OBJECT_GET_CLASS(PCIDeviceClass, (obj), TYPE_PCI_DEVICE)
+/* Implemented by devices that can be plugged on PCI Express buses */
+#define INTERFACE_PCIE_DEVICE "pci-express-device"
+
+/* Implemented by devices that can be plugged on Conventional PCI buses */
+#define INTERFACE_CONVENTIONAL_PCI_DEVICE "conventional-pci-device"
+
typedef struct PCIINTxRoute {
enum {
PCI_INTX_ENABLED,