diff mbox

[RFC,04/23] 40p: Add PCI host

Message ID 1308019077-61957-5-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>

Avoid global variable for PCIBus. Inline PCI bus creation.
Suppress potential gcc 4.6 write-only variable warning.

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

Patch

diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 071c149..50cb6c7 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -38,6 +38,7 @@ 
 #include "loader.h"
 #include "mc146818rtc.h"
 #include "blockdev.h"
+#include "sysbus.h"
 
 //#define HARD_DEBUG_PPC_IO
 //#define DEBUG_PPC_IO
@@ -774,6 +775,8 @@  static void ibm_40p_init(ram_addr_t ram_size,
     char *filename;
     int bios_size;
     ram_addr_t ram_offset, bios_offset;
+    DeviceState *dev;
+    PCIBus *pci_bus;
 
     // IBM E15 graphic adapter (S3 Vision864)
     // PowerPC 601
@@ -816,6 +819,11 @@  static void ibm_40p_init(ram_addr_t ram_size,
     if (filename) {
         qemu_free(filename);
     }
+
+    /* PCI host */
+    dev = sysbus_create_simple("prep-pci", 0x80800000, NULL);
+    pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+    (void)pci_bus;
 }
 
 static QEMUMachine prep_machine = {