qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 04/23] 40p: Add PCI host


From: Andreas Färber
Subject: [Qemu-devel] [RFC 04/23] 40p: Add PCI host
Date: Tue, 14 Jun 2011 04:37:38 +0200

Signed-off-by: Hervé Poussineau <address@hidden>

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

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/ppc_prep.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

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 = {
-- 
1.7.5.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]