From patchwork Wed May 25 01:58:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 97269 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 BF53CB6F91 for ; Wed, 25 May 2011 12:05:55 +1000 (EST) Received: from localhost ([::1]:55330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3Ts-0007CH-JG for incoming@patchwork.ozlabs.org; Tue, 24 May 2011 22:05:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3N2-0003Nk-3i for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QP3My-0008VD-W3 for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:47 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:32911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QP3My-0008SS-Ju for qemu-devel@nongnu.org; Tue, 24 May 2011 21:58:44 -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 AC81A280D4; Wed, 25 May 2011 10:58:42 +0900 (JST) Received: (nullmailer pid 21050 invoked by uid 1000); Wed, 25 May 2011 01:58:36 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Wed, 25 May 2011 10:58:30 +0900 Message-Id: X-Mailer: git-send-email 1.7.1.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) X-Received-From: 210.128.90.3 Cc: yamahata@valinux.co.jp, mst@redhat.com Subject: [Qemu-devel] [PATCH v3 33/39] hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids 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 use PCIDeviceInfo to initialize ids. Signed-off-by: Isaku Yamahata --- hw/versatile_pci.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c index 2fed8a0..8e75ffc 100644 --- a/hw/versatile_pci.c +++ b/hw/versatile_pci.c @@ -133,12 +133,8 @@ static int pci_realview_init(SysBusDevice *dev) static int versatile_pci_host_init(PCIDevice *d) { - pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_XILINX); - /* Both boards have the same device ID. Oh well. */ - pci_config_set_device_id(d->config, PCI_DEVICE_ID_XILINX_XC2VP30); pci_set_word(d->config + PCI_STATUS, PCI_STATUS_66MHZ | PCI_STATUS_DEVSEL_MEDIUM); - pci_config_set_class(d->config, PCI_CLASS_PROCESSOR_CO); pci_set_byte(d->config + PCI_LATENCY_TIMER, 0x10); return 0; } @@ -147,6 +143,10 @@ static PCIDeviceInfo versatile_pci_host_info = { .qdev.name = "versatile_pci_host", .qdev.size = sizeof(PCIDevice), .init = versatile_pci_host_init, + .vendor_id = PCI_VENDOR_ID_XILINX, + /* Both boards have the same device ID. Oh well. */ + .device_id = PCI_DEVICE_ID_XILINX_XC2VP30, + .class_id = PCI_CLASS_PROCESSOR_CO, }; static void versatile_pci_register_devices(void)