From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaxqV-0007wA-BQ for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaxqU-0006TO-CB for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:43 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:51081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaxqT-0006Sw-NU for qemu-devel@nongnu.org; Wed, 14 Dec 2011 18:02:42 -0500 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 15 Dec 2011 00:02:39 +0100 Message-Id: <1323903763-22933-8-git-send-email-hpoussin@reactos.org> In-Reply-To: <1323903763-22933-1-git-send-email-hpoussin@reactos.org> References: <1323903763-22933-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 07/11] fulong2e: give ISA bus to ISA methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Signed-off-by: Herv=C3=A9 Poussineau --- hw/mips_fulong2e.c | 6 ++---- hw/vt82c686.c | 4 ++-- hw/vt82c686.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index e6e120c..5e87665 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -264,7 +264,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, c= onst 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); =20 - via_devfn =3D vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0= )); - if (via_devfn < 0) { + isa_bus =3D vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0))= ; + if (!isa_bus) { fprintf(stderr, "vt82c686b_init error\n"); exit(1); } - isa_bus =3D NULL; =20 /* Interrupt controller */ /* The 8259 -> IP5 */ diff --git a/hw/vt82c686.c b/hw/vt82c686.c index 2845959..038128b 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -507,13 +507,13 @@ static int vt82c686b_initfn(PCIDevice *d) return 0; } =20 -int vt82c686b_init(PCIBus *bus, int devfn) +ISABus *vt82c686b_init(PCIBus *bus, int devfn) { PCIDevice *d; =20 d =3D pci_create_simple_multifunction(bus, devfn, true, "VT82C686B")= ; =20 - return d->devfn; + return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0")= ); } =20 static PCIDeviceInfo via_info =3D { diff --git a/hw/vt82c686.h b/hw/vt82c686.h index e3270ca..6ef876d 100644 --- a/hw/vt82c686.h +++ b/hw/vt82c686.h @@ -2,7 +2,7 @@ #define HW_VT82C686_H =20 /* 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, --=20 1.7.7.3