# HG changeset patch
# User Christian Ehrhardt <[EMAIL PROTECTED]>
# Date 1228922789 -3600
# Node ID 9a7208ca1afab83913ee14c629bf27632ee6326b
# Parent  5adc6fbbd4a3b82e1bc8acbcb233c60e89715b61
[PATCH] kvm-userspace: ppc: align with upstream qemu - pcibus

From: Christian Ehrhardt <[EMAIL PROTECTED]>

ppc initializer now properly use the opaque PCIBus type. This is already
changed in all upstream qemu files. This patch changes kvm ppc440 files
to use the new type too.

Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]>
---

[diffstat]
 ppc440.c        |   11 ++++++-----
 ppc440.h        |    3 ++-
 ppc440_bamboo.c |   10 +++++-----
 3 files changed, 13 insertions(+), 11 deletions(-)

[diff]

diff --git a/qemu/hw/ppc440.c b/qemu/hw/ppc440.c
--- a/qemu/hw/ppc440.c
+++ b/qemu/hw/ppc440.c
@@ -13,6 +13,7 @@
 #include "hw.h"
 #include "hw/isa.h"
 #include "ppc440.h"
+#include "pci.h"
 
 #define PPC440EP_PCI_CONFIG 0xeec00000
 #define PPC440EP_PCI_INTACK 0xeed00000
@@ -29,12 +30,12 @@ void ppc440ep_init(CPUState *env,
                target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS],
                int nbanks,
                qemu_irq **picp,
-               ppc4xx_pci_t **pcip,
+               PCIBus **pcibusp,
                int do_init)
 {
        ppc4xx_mmio_t *mmio;
        qemu_irq *pic, *irqs;
-       ppc4xx_pci_t *pci;
+       PCIBus *pcibus;
        int i;
 
        ppc_dcr_init(env, NULL, NULL);
@@ -59,14 +60,14 @@ void ppc440ep_init(CPUState *env,
        ppc405_sdram_init(env, pic[14], nbanks, ram_bases, ram_sizes, do_init);
 
        /* PCI */
-       pci = ppc4xx_pci_init(env, pic,
+       pcibus = ppc4xx_pci_init(env, pic,
                              PPC440EP_PCI_CONFIG,
                              PPC440EP_PCI_INTACK,
                              PPC440EP_PCI_SPECIAL,
                              PPC440EP_PCI_REGS);
-       if (!pci)
+       if (!pcibus)
                printf("couldn't create PCI controller!\n");
-       *pcip = pci;
+       *pcibusp = pcibus;
 
        isa_mmio_init(PPC440EP_PCI_IO, PPC440EP_PCI_IOLEN);
 
diff --git a/qemu/hw/ppc440.h b/qemu/hw/ppc440.h
--- a/qemu/hw/ppc440.h
+++ b/qemu/hw/ppc440.h
@@ -20,6 +20,7 @@
 #include "sysemu.h"
 #include "exec-all.h"
 #include "boards.h"
+#include "pci.h"
 
 #define PPC440_MAX_RAM_SLOTS 4
 
@@ -28,7 +29,7 @@ void ppc440ep_init(CPUState *env,
                target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS],
                int nbanks,
                qemu_irq **picp,
-               ppc4xx_pci_t **pcip,
+               PCIBus **pcip,
                int do_init);
 
 #endif
diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c
--- a/qemu/hw/ppc440_bamboo.c
+++ b/qemu/hw/ppc440_bamboo.c
@@ -37,7 +37,7 @@ void bamboo_init(ram_addr_t ram_size, in
        target_phys_addr_t ram_sizes[PPC440_MAX_RAM_SLOTS];
        NICInfo *nd;
        qemu_irq *pic;
-       ppc4xx_pci_t *pci;
+       PCIBus *pcibus;
        CPUState *env;
     uint64_t elf_entry;
     uint64_t elf_lowaddr;
@@ -102,7 +102,7 @@ void bamboo_init(ram_addr_t ram_size, in
 
        /* call init */
        printf("Calling function ppc440_init\n");
-       ppc440ep_init(env, ram_bases, ram_sizes, nbanks, &pic, &pci, 1);
+       ppc440ep_init(env, ram_bases, ram_sizes, nbanks, &pic, &pcibus, 1);
        printf("Done calling ppc440_init\n");
 
        /* load kernel with uboot loader */
@@ -197,12 +197,12 @@ void bamboo_init(ram_addr_t ram_size, in
                env->nip = entry;
        }
 
-       if (pci) {
+       if (pcibus) {
                int unit_id = 0;
 
                /* Add virtio block devices. */
                while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
-                       virtio_blk_init(pci->bus, 0x1AF4, 0x1001,
+                       virtio_blk_init(pcibus, 0x1AF4, 0x1001,
                                drives_table[i].bdrv);
                        unit_id++;
                }
@@ -212,7 +212,7 @@ void bamboo_init(ram_addr_t ram_size, in
                        nd = &nd_table[i];
                        if (!nd->model)
                                nd->model = "virtio";
-                       pci_nic_init(pci->bus, nd, -1);
+                       pci_nic_init(pcibus, nd, -1);
                }
        }
 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to