From patchwork Mon Oct 24 20:18:22 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: 121404 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 19D11B6F8A for ; Tue, 25 Oct 2011 07:18:44 +1100 (EST) Received: from localhost ([::1]:41031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQyk-0002GV-91 for incoming@patchwork.ozlabs.org; Mon, 24 Oct 2011 16:18:38 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQyM-00020p-1t for qemu-devel@nongnu.org; Mon, 24 Oct 2011 16:18:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIQyK-0001Yz-Ey for qemu-devel@nongnu.org; Mon, 24 Oct 2011 16:18:13 -0400 Received: from smtp23.services.sfr.fr ([93.17.128.19]:58040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQyK-0001Yi-81 for qemu-devel@nongnu.org; Mon, 24 Oct 2011 16:18:12 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2304.sfr.fr (SMTP Server) with ESMTP id 91A0970000F2; Mon, 24 Oct 2011 22:18:11 +0200 (CEST) Received: from localhost.localdomain (unknown [92.90.16.152]) by msfrf2304.sfr.fr (SMTP Server) with ESMTP id 17FF770000E8; Mon, 24 Oct 2011 22:18:10 +0200 (CEST) X-SFR-UUID: 20111024201811983.17FF770000E8@msfrf2304.sfr.fr From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Mon, 24 Oct 2011 22:18:22 +0200 Message-Id: <1319487505-5915-9-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1319487505-5915-1-git-send-email-hpoussin@reactos.org> References: <1319487505-5915-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 93.17.128.19 Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PATCH 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 98177f3..78d99e7 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -941,8 +941,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 127940c..bc67b2b 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -194,7 +194,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; }