From 71baa3036fa175f2a5fb08a1a64c541cddb47be4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 15 Dec 2011 22:09:55 +0100 Subject: [PATCH] alpha: give ISA bus to ISA methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Hervé Poussineau Signed-off-by: Anthony Liguori --- hw/alpha_dp264.c | 4 ++-- hw/alpha_sys.h | 3 ++- hw/alpha_typhoon.c | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c index a07a2ff411..876335a773 100644 --- a/hw/alpha_dp264.c +++ b/hw/alpha_dp264.c @@ -68,8 +68,8 @@ static void clipper_init(ram_addr_t ram_size, cpus[0]->trap_arg2 = smp_cpus; /* Init the chipset. */ - pci_bus = typhoon_init(ram_size, &rtc_irq, cpus, clipper_pci_map_irq); - isa_bus = NULL; + pci_bus = typhoon_init(ram_size, &isa_bus, &rtc_irq, cpus, + clipper_pci_map_irq); rtc_init(isa_bus, 1980, rtc_irq); pit_init(isa_bus, 0x40, 0); diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h index 13f017733b..d54b18f8ed 100644 --- a/hw/alpha_sys.h +++ b/hw/alpha_sys.h @@ -12,7 +12,8 @@ #include "irq.h" -PCIBus *typhoon_init(ram_addr_t, qemu_irq *, CPUState *[4], pci_map_irq_fn); +PCIBus *typhoon_init(ram_addr_t, ISABus **, qemu_irq *, CPUState *[4], + pci_map_irq_fn); /* alpha_pci.c. */ extern const MemoryRegionOps alpha_pci_bw_io_ops; diff --git a/hw/alpha_typhoon.c b/hw/alpha_typhoon.c index 113837d014..adf738272e 100644 --- a/hw/alpha_typhoon.c +++ b/hw/alpha_typhoon.c @@ -691,7 +691,8 @@ static void typhoon_alarm_timer(void *opaque) cpu_interrupt(s->cchip.cpu[cpu], CPU_INTERRUPT_TIMER); } -PCIBus *typhoon_init(ram_addr_t ram_size, qemu_irq *p_rtc_irq, +PCIBus *typhoon_init(ram_addr_t ram_size, ISABus **isa_bus, + qemu_irq *p_rtc_irq, CPUState *cpus[4], pci_map_irq_fn sys_map_irq) { const uint64_t MB = 1024 * 1024; @@ -791,12 +792,11 @@ PCIBus *typhoon_init(ram_addr_t ram_size, qemu_irq *p_rtc_irq, /* ??? Technically there should be a cy82c693ub pci-isa bridge. */ { qemu_irq isa_pci_irq, *isa_irqs; - ISABus *isa_bus; - isa_bus = isa_bus_new(NULL, addr_space_io); + *isa_bus = isa_bus_new(NULL, addr_space_io); isa_pci_irq = *qemu_allocate_irqs(typhoon_set_isa_irq, s, 1); - isa_irqs = i8259_init(isa_bus, isa_pci_irq); - isa_bus_irqs(isa_bus, isa_irqs); + isa_irqs = i8259_init(*isa_bus, isa_pci_irq); + isa_bus_irqs(*isa_bus, isa_irqs); } return b; -- 2.34.1