]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
fulong2e: give ISA bus to ISA methods
authorHervé Poussineau <hpoussin@reactos.org>
Thu, 15 Dec 2011 21:09:57 +0000 (22:09 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 20 Dec 2011 21:44:30 +0000 (15:44 -0600)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/mips_fulong2e.c
hw/vt82c686.c
hw/vt82c686.h

index e6e120cb80b95cc1dd5ad8811ea50c83e66a550c..5e87665188bc7d75f7d10b83388af4bcd0e17ffb 100644 (file)
@@ -264,7 +264,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
     int64_t kernel_entry;
     qemu_irq *i8259;
     qemu_irq *cpu_exit_irq;
-    int via_devfn;
     PCIBus *pci_bus;
     ISABus *isa_bus;
     i2c_bus *smbus;
@@ -338,12 +337,11 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
     /* South bridge */
     ide_drive_get(hd, MAX_IDE_BUS);
 
-    via_devfn = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0));
-    if (via_devfn < 0) {
+    isa_bus = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0));
+    if (!isa_bus) {
         fprintf(stderr, "vt82c686b_init error\n");
         exit(1);
     }
-    isa_bus = NULL;
 
     /* Interrupt controller */
     /* The 8259 -> IP5  */
index 284595905dc52ddf980dfe4b638a3c66cf9f6894..038128b84c55c232177706b063a4a8ea218f085d 100644 (file)
@@ -507,13 +507,13 @@ static int vt82c686b_initfn(PCIDevice *d)
     return 0;
 }
 
-int vt82c686b_init(PCIBus *bus, int devfn)
+ISABus *vt82c686b_init(PCIBus *bus, int devfn)
 {
     PCIDevice *d;
 
     d = pci_create_simple_multifunction(bus, devfn, true, "VT82C686B");
 
-    return d->devfn;
+    return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
 }
 
 static PCIDeviceInfo via_info = {
index e3270cafd75bedbe73c6439583387a766320b77d..6ef876d2602ff863185c5a57ebf9c199011865cb 100644 (file)
@@ -2,7 +2,7 @@
 #define HW_VT82C686_H
 
 /* vt82c686.c */
-int vt82c686b_init(PCIBus * bus, int devfn);
+ISABus *vt82c686b_init(PCIBus * bus, int devfn);
 void vt82c686b_ac97_init(PCIBus *bus, int devfn);
 void vt82c686b_mc97_init(PCIBus *bus, int devfn);
 i2c_bus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,