From af25c5c5c0f5368c6742af4bde936830c3e90703 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Wed, 10 Dec 2008 16:45:52 +0100 Subject: [PATCH] Ppc: align with upstream qemu - pcibus 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 Signed-off-by: Avi Kivity --- hw/ppc440.c | 11 ++++++----- hw/ppc440.h | 3 ++- hw/ppc440_bamboo.c | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hw/ppc440.c b/hw/ppc440.c index 5a0218619b..249add5ffb 100644 --- a/hw/ppc440.c +++ b/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/hw/ppc440.h b/hw/ppc440.h index 36156496a3..9523f946b5 100644 --- a/hw/ppc440.h +++ b/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/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 57d04f9c50..50959cbc7c 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -37,7 +37,7 @@ void bamboo_init(ram_addr_t ram_size, int vga_ram_size, 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, int vga_ram_size, /* 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, int vga_ram_size, 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, int vga_ram_size, nd = &nd_table[i]; if (!nd->model) nd->model = "virtio"; - pci_nic_init(pci->bus, nd, -1); + pci_nic_init(pcibus, nd, -1); } } -- 2.11.4.GIT