]> git.proxmox.com Git - qemu.git/commitdiff
PPC: e500: Declare pci bridge as bridge
authorAlexander Graf <agraf@suse.de>
Sat, 8 Dec 2012 13:27:26 +0000 (14:27 +0100)
committerAlexander Graf <agraf@suse.de>
Fri, 14 Dec 2012 12:12:56 +0000 (13:12 +0100)
The new PCI host bridge device needs to identify itself as PCI host bridge.
Declare it as such.

Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppce500_pci.c

index 54c72b4fd29373c234b85ca84800101f05e4c401..e5343411be2999855167c4e998e9f506c70b7703 100644 (file)
@@ -330,9 +330,15 @@ static int e500_pcihost_bridge_initfn(PCIDevice *d)
     PPCE500CCSRState *ccsr = CCSR(container_get(qdev_get_machine(),
                                   "/e500-ccsr"));
 
+    pci_config_set_class(d->config, PCI_CLASS_BRIDGE_PCI);
+    d->config[PCI_HEADER_TYPE] =
+        (d->config[PCI_HEADER_TYPE] & PCI_HEADER_TYPE_MULTI_FUNCTION) |
+        PCI_HEADER_TYPE_BRIDGE;
+
     memory_region_init_alias(&b->bar0, "e500-pci-bar0", &ccsr->ccsr_space,
                              0, int128_get64(ccsr->ccsr_space.size));
     pci_register_bar(d, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &b->bar0);
+
     return 0;
 }