diff mbox

[RFC,07/23] 40p: Add a PCI to ISA bridge (i82378)

Message ID 1308019077-61957-8-git-send-email-andreas.faerber@web.de
State New
Headers show

Commit Message

Andreas Färber June 14, 2011, 2:37 a.m. UTC
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>

Don't create an ISA bus at machine level, the i82378 does that.

Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 hw/ppc_prep.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 50cb6c7..27e1d14 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -775,8 +775,10 @@  static void ibm_40p_init(ram_addr_t ram_size,
     char *filename;
     int bios_size;
     ram_addr_t ram_offset, bios_offset;
+    qemu_irq *cpu_exit_irq;
     DeviceState *dev;
     PCIBus *pci_bus;
+    PCIDevice *pci;
 
     // IBM E15 graphic adapter (S3 Vision864)
     // PowerPC 601
@@ -823,7 +825,12 @@  static void ibm_40p_init(ram_addr_t ram_size,
     /* PCI host */
     dev = sysbus_create_simple("prep-pci", 0x80800000, NULL);
     pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
-    (void)pci_bus;
+
+    /* PCI -> ISA bridge */
+    pci = pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "i82378");
+    cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
+    qdev_connect_gpio_out(&pci->qdev, 0, env->irq_inputs[PPC6xx_INPUT_INT]);
+    qdev_connect_gpio_out(&pci->qdev, 1, *cpu_exit_irq);
 }
 
 static QEMUMachine prep_machine = {