From patchwork Wed Jun 23 07:15:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 56604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 13A70B6F05 for ; Wed, 23 Jun 2010 17:21:14 +1000 (EST) Received: from localhost ([127.0.0.1]:54441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORKGk-0003ry-RN for incoming@patchwork.ozlabs.org; Wed, 23 Jun 2010 03:21:10 -0400 Received: from [140.186.70.92] (port=40737 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ORKF6-0003mR-Mm for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:19:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ORKF0-0004AN-M0 for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:19:24 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:52208) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ORKF0-00049k-Ap for qemu-devel@nongnu.org; Wed, 23 Jun 2010 03:19:22 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 5031E10747E; Wed, 23 Jun 2010 16:19:20 +0900 (JST) Received: (nullmailer pid 29749 invoked by uid 1000); Wed, 23 Jun 2010 07:15:33 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Wed, 23 Jun 2010 16:15:31 +0900 Message-Id: X-Mailer: git-send-email 1.6.6.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yu.liu@freescale.com, mst@redhat.com, blauwirbel@gmail.com, yamahata@valinux.co.jp, paul@codesourcery.com, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v5 7/9] pci: set multifunction property for normal device. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org use pci_create_simple_multifunction() for normal device which sets multifunction bit. At the moment, only pc_piix.c and mips_malta.c uses multifunction devices with piix3/4 pci-isa bridge. And other boards don't populate those devices. Signed-off-by: Isaku Yamahata --- changes v4 -> v5: - uint8_t mf -> bool multifunction --- hw/piix4.c | 2 +- hw/piix_pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/piix4.c b/hw/piix4.c index f75951b..2298074 100644 --- a/hw/piix4.c +++ b/hw/piix4.c @@ -105,7 +105,7 @@ int piix4_init(PCIBus *bus, int devfn) { PCIDevice *d; - d = pci_create_simple(bus, devfn, "PIIX4"); + d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4"); return d->devfn; } diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 7917ae0..a3185f7 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -234,7 +234,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq * *pi440fx_state = DO_UPCAST(PCII440FXState, dev, d); piix3 = DO_UPCAST(PIIX3State, dev, - pci_create_simple(b, -1, "PIIX3")); + pci_create_simple_multifunction(b, -1, true, "PIIX3")); piix3->pic = pic; pci_bus_irqs(b, piix3_set_irq, pci_slot_get_pirq, piix3, 4); (*pi440fx_state)->piix3 = piix3;