From patchwork Thu Dec 15 21:09:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 131749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6922D1007D6 for ; Fri, 16 Dec 2011 08:42:53 +1100 (EST) Received: from localhost ([::1]:32830 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbIZN-0001C9-5g for incoming@patchwork.ozlabs.org; Thu, 15 Dec 2011 16:10:25 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbIZ6-00010d-5u for qemu-devel@nongnu.org; Thu, 15 Dec 2011 16:10:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbIZ5-00045A-2M for qemu-devel@nongnu.org; Thu, 15 Dec 2011 16:10:08 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:35427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbIZ3-00042f-QZ for qemu-devel@nongnu.org; Thu, 15 Dec 2011 16:10:06 -0500 Received: from localhost.localdomain (unknown [82.227.227.196]) by smtp1-g21.free.fr (Postfix) with ESMTP id D9A2494026D; Thu, 15 Dec 2011 22:09:58 +0100 (CET) From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Thu, 15 Dec 2011 22:09:58 +0100 Message-Id: <1323983401-18345-9-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1323983401-18345-1-git-send-email-hpoussin@reactos.org> References: <1323983401-18345-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.27.42.1 Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PATCH v3 08/11] malta: give ISA bus to ISA methods X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Hervé Poussineau --- hw/mips_malta.c | 3 +-- hw/pc.h | 2 +- hw/piix4.c | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 621e661..330924e 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -942,8 +942,7 @@ void mips_malta_init (ram_addr_t ram_size, /* Southbridge */ ide_drive_get(hd, MAX_IDE_BUS); - piix4_devfn = piix4_init(pci_bus, 80); - isa_bus = NULL; + piix4_devfn = piix4_init(pci_bus, &isa_bus, 80); /* Interrupt controller */ /* The 8259 is attached to the MIPS CPU INT0 pin, ie interrupt 2 */ diff --git a/hw/pc.h b/hw/pc.h index 04e72cc..17648cc 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -196,7 +196,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix_devfn, /* piix4.c */ extern PCIDevice *piix4_dev; -int piix4_init(PCIBus *bus, int devfn); +int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn); /* vga.c */ enum vga_retrace_method { diff --git a/hw/piix4.c b/hw/piix4.c index 2fd1171..51af459 100644 --- a/hw/piix4.c +++ b/hw/piix4.c @@ -93,11 +93,12 @@ static int piix4_initfn(PCIDevice *dev) return 0; } -int piix4_init(PCIBus *bus, int devfn) +int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn) { PCIDevice *d; d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4"); + *isa_bus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0")); return d->devfn; }