[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 04/11] pc: give ISA bus to ISA methods
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [PATCH v3 04/11] pc: give ISA bus to ISA methods |
Date: |
Thu, 15 Dec 2011 22:09:54 +0100 |
Signed-off-by: Hervé Poussineau <address@hidden>
---
hw/pc.h | 2 +-
hw/pc_piix.c | 3 +--
hw/piix_pci.c | 8 +++++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/pc.h b/hw/pc.h
index afb7535..04e72cc 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -183,7 +183,7 @@ struct PCII440FXState;
typedef struct PCII440FXState PCII440FXState;
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn,
- qemu_irq *pic,
+ ISABus **isa_bus, qemu_irq *pic,
MemoryRegion *address_space_mem,
MemoryRegion *address_space_io,
ram_addr_t ram_size,
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 2939a55..4670f8f 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -137,7 +137,7 @@ static void pc_init1(MemoryRegion *system_memory,
gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
if (pci_enabled) {
- pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, gsi,
+ pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
system_memory, system_io, ram_size,
below_4g_mem_size,
0x100000000ULL - below_4g_mem_size,
@@ -146,7 +146,6 @@ static void pc_init1(MemoryRegion *system_memory,
? 0
: ((uint64_t)1 << 62)),
pci_memory, ram_memory);
- isa_bus = NULL;
} else {
pci_bus = NULL;
i440fx_state = NULL;
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index d785d4b..57f5ea6 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -263,7 +263,7 @@ static int i440fx_initfn(PCIDevice *dev)
static PCIBus *i440fx_common_init(const char *device_name,
PCII440FXState **pi440fx_state,
int *piix3_devfn,
- qemu_irq *pic,
+ ISABus **isa_bus, qemu_irq *pic,
MemoryRegion *address_space_mem,
MemoryRegion *address_space_io,
ram_addr_t ram_size,
@@ -328,6 +328,8 @@ static PCIBus *i440fx_common_init(const char *device_name,
qdev_property_add_child(dev, "piix3", &piix3->dev.qdev, NULL);
}
piix3->pic = pic;
+ *isa_bus = DO_UPCAST(ISABus, qbus,
+ qdev_get_child_bus(&piix3->dev.qdev, "isa.0"));
(*pi440fx_state)->piix3 = piix3;
@@ -344,7 +346,7 @@ static PCIBus *i440fx_common_init(const char *device_name,
}
PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn,
- qemu_irq *pic,
+ ISABus **isa_bus, qemu_irq *pic,
MemoryRegion *address_space_mem,
MemoryRegion *address_space_io,
ram_addr_t ram_size,
@@ -357,7 +359,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int
*piix3_devfn,
{
PCIBus *b;
- b = i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, pic,
+ b = i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, isa_bus, pic,
address_space_mem, address_space_io, ram_size,
pci_hole_start, pci_hole_size,
pci_hole64_size, pci_hole64_size,
--
1.7.7.3
- [Qemu-devel] [PATCH v3 00/11] isa: preliminary work for multiple buses, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 02/11] isa: move ISABus structure definition to header file, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 01/11] isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 03/11] i8259: give ISA device to isa_register_ioport(), Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 04/11] pc: give ISA bus to ISA methods,
Hervé Poussineau <=
- [Qemu-devel] [PATCH v3 05/11] alpha: give ISA bus to ISA methods, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 06/11] sun4u: give ISA bus to ISA methods, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 07/11] fulong2e: give ISA bus to ISA methods, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 08/11] malta: give ISA bus to ISA methods, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 10/11] isa: always use provided ISA bus in isa_bus_irqs(), Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 09/11] isa: always use provided ISA bus when creating an isa device, Hervé Poussineau, 2011/12/15
- [Qemu-devel] [PATCH v3 11/11] audio: remove unused parameter isa_pic, Hervé Poussineau, 2011/12/15
- Re: [Qemu-devel] [PATCH v3 00/11] isa: preliminary work for multiple buses, Anthony Liguori, 2011/12/20