aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/e500.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-12-12 13:53:53 +0100
committerAlexander Graf <agraf@suse.de>2012-12-14 13:12:57 +0100
commit492ec48dc2d99ca13b24d554e1970af7e2581e23 (patch)
tree340f69c98ae3c140dd64b519a9a04bb3d28c4583 /hw/ppc/e500.c
parent347dd79dccf41a679115213da673dfd06c4c8cc8 (diff)
PPC: E500: Move PCI slot information into params
We have a params struct that allows us to expose differences between e500 machine models. Include PCI slot information there, so we can have different machines with different PCI slot topology. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r--hw/ppc/e500.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index ebb6d96689..564f6548e4 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -339,7 +339,8 @@ static int ppce500_load_device_tree(CPUPPCState *env,
qemu_devtree_setprop_cells(fdt, pci, "interrupt-map-mask", 0xf800, 0x0,
0x0, 0x7);
pci_map = pci_map_create(fdt, qemu_devtree_get_phandle(fdt, mpic),
- 0x11, 2, &len);
+ params->pci_first_slot, params->pci_nr_slots,
+ &len);
qemu_devtree_setprop(fdt, pci, "interrupt-map", pci_map, len);
qemu_devtree_setprop_phandle(fdt, pci, "interrupt-parent", mpic);
qemu_devtree_setprop_cells(fdt, pci, "interrupts", 24, 2);
@@ -569,6 +570,7 @@ void ppce500_init(PPCE500Params *params)
/* PCI */
dev = qdev_create(NULL, "e500-pcihost");
+ qdev_prop_set_uint32(dev, "first_slot", params->pci_first_slot);
qdev_init_nofail(dev);
s = SYS_BUS_DEVICE(dev);
sysbus_connect_irq(s, 0, mpic[pci_irq_nrs[0]]);