Skip to content

Commit

Permalink
PPC: e500: Declare pci bridge as bridge
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
agraf committed Dec 14, 2012
1 parent a911b7a commit 9975050
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hw/ppce500_pci.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9975050

Please sign in to comment.