]> Git Repo - qemu.git/commitdiff
pcie: Convert PCIExpressHost to use the QOM.
authorJason Baron <[email protected]>
Fri, 19 Oct 2012 20:43:33 +0000 (16:43 -0400)
committerMichael S. Tsirkin <[email protected]>
Mon, 29 Oct 2012 15:59:45 +0000 (17:59 +0200)
Let's use PCIExpressHost with QOM.

Reviewed-by: Paolo Bonzini <[email protected]>
Acked-by: Andreas Färber <[email protected]>
Signed-off-by: Jason Baron <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/pcie_host.c
hw/pcie_host.h

index 2231d28ec346ac4fda98662dbd174f51db16cd55..c257fb43cacd52206f8e0e00e44f0988e05e6745 100644 (file)
@@ -145,3 +145,17 @@ void pcie_host_mmcfg_update(PCIExpressHost *e,
         pcie_host_mmcfg_map(e, addr, size);
     }
 }
+
+static const TypeInfo pcie_host_type_info = {
+    .name = TYPE_PCIE_HOST_BRIDGE,
+    .parent = TYPE_PCI_HOST_BRIDGE,
+    .abstract = true,
+    .instance_size = sizeof(PCIExpressHost),
+};
+
+static void pcie_host_register_types(void)
+{
+    type_register_static(&pcie_host_type_info);
+}
+
+type_init(pcie_host_register_types)
index 73e88db73e144b3f263335106834845757c4cb8b..392193530d4160518711b5b244d12415ab376073 100644 (file)
 #include "pci_host.h"
 #include "memory.h"
 
+#define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge"
+#define PCIE_HOST_BRIDGE(obj) \
+    OBJECT_CHECK(PCIExpressHost, (obj), TYPE_PCIE_HOST_BRIDGE)
+
 struct PCIExpressHost {
     PCIHostState pci;
 
This page took 0.029623 seconds and 4 git commands to generate.