aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/sam460ex.c
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2018-07-31 13:08:00 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-08-01 11:01:38 +1000
commit6484ab3dffadc79020a71376010f517d60b81b83 (patch)
treec5851a2628797a459098f1e1e65652314e791747 /hw/ppc/sam460ex.c
parent1069a3c6e1176001116116629427550f138d68a4 (diff)
downloadqemu-6484ab3dffadc79020a71376010f517d60b81b83.zip
qemu-6484ab3dffadc79020a71376010f517d60b81b83.tar.gz
qemu-6484ab3dffadc79020a71376010f517d60b81b83.tar.bz2
sam460ex: Fix PCI interrupts with multiple devices
The four interrupts of the PCI bus are connected to the same UIC pin on the real Sam460ex. Evidence for this can be found in the UBoot source for the Sam460ex in the Sam460ex.c file where PCI_INTERRUPT_LINE is written. Change the ppc440_pcix model to behave more like this. This fixes the problem that can be observed when adding further PCI cards that got their interrupt rotated to other interrupts than PCI INT A. In particular, the bug was observed with an additional OHCI PCI card or an ES1370 sound device. Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Tested-by: Sebastian Bauer <mail@sebastianbauer.info> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/sam460ex.c')
-rw-r--r--hw/ppc/sam460ex.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 0999efc..9c77183 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -515,10 +515,8 @@ static void sam460ex_init(MachineState *machine)
/* PCI bus */
ppc460ex_pcie_init(env);
- /* FIXME: is this correct? */
- dev = sysbus_create_varargs("ppc440-pcix-host", 0xc0ec00000,
- uic[1][0], uic[1][20], uic[1][21], uic[1][22],
- NULL);
+ /* All PCI irqs are connected to the same UIC pin (cf. UBoot source) */
+ dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000, uic[1][0]);
pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
if (!pci_bus) {
error_report("couldn't create PCI controller!");