diff options
author | Hervé Poussineau | 2011-12-15 22:09:51 +0100 |
---|---|---|
committer | Anthony Liguori | 2011-12-20 22:44:30 +0100 |
commit | 48a18b3c698295e4d891f34e919615e84e20f027 (patch) | |
tree | 689d5ec205341895b0eef457f3c0313be53b5432 /hw/sun4u.c | |
parent | net: store guest timestamp in dump file instead of time since guest startup (diff) | |
download | qemu-48a18b3c698295e4d891f34e919615e84e20f027.tar.gz qemu-48a18b3c698295e4d891f34e919615e84e20f027.tar.xz qemu-48a18b3c698295e4d891f34e919615e84e20f027.zip |
isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions
NULL is a valid bus/device, so there is no change in behaviour.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r-- | hw/sun4u.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c index 97600a942d..dfb81da562 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -526,14 +526,17 @@ static void dummy_isa_irq_handler(void *opaque, int n, int level) } /* EBUS (Eight bit bus) bridge */ -static void +static ISABus * pci_ebus_init(PCIBus *bus, int devfn) { qemu_irq *isa_irq; + ISABus *isa_bus; pci_create_simple(bus, devfn, "ebus"); + isa_bus = NULL; isa_irq = qemu_allocate_irqs(dummy_isa_irq_handler, NULL, 16); - isa_bus_irqs(isa_irq); + isa_bus_irqs(isa_bus, isa_irq); + return isa_bus; } static int @@ -744,6 +747,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, unsigned int i; long initrd_size, kernel_size; PCIBus *pci_bus, *pci_bus2, *pci_bus3; + ISABus *isa_bus; qemu_irq *irq; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; DriveInfo *fd[MAX_FD]; @@ -764,7 +768,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, pci_vga_init(pci_bus); // XXX Should be pci_bus3 - pci_ebus_init(pci_bus, -1); + isa_bus = pci_ebus_init(pci_bus, -1); i = 0; if (hwdef->console_serial_base) { @@ -774,13 +778,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem, } for(; i < MAX_SERIAL_PORTS; i++) { if (serial_hds[i]) { - serial_isa_init(i, serial_hds[i]); + serial_isa_init(isa_bus, i, serial_hds[i]); } } for(i = 0; i < MAX_PARALLEL_PORTS; i++) { if (parallel_hds[i]) { - parallel_init(i, parallel_hds[i]); + parallel_init(isa_bus, i, parallel_hds[i]); } } @@ -791,12 +795,12 @@ static void sun4uv_init(MemoryRegion *address_space_mem, pci_cmd646_ide_init(pci_bus, hd, 1); - isa_create_simple("i8042"); + isa_create_simple(isa_bus, "i8042"); for(i = 0; i < MAX_FD; i++) { fd[i] = drive_get(IF_FLOPPY, 0, i); } - fdctrl_init_isa(fd); - nvram = m48t59_init_isa(0x0074, NVRAM_SIZE, 59); + fdctrl_init_isa(isa_bus, fd); + nvram = m48t59_init_isa(isa_bus, 0x0074, NVRAM_SIZE, 59); initrd_size = 0; kernel_size = sun4u_load_kernel(kernel_filename, initrd_filename, |