From patchwork Thu Dec 10 18:11:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 40862 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 A05D4B6F06 for ; Fri, 11 Dec 2009 05:37:46 +1100 (EST) Received: from localhost ([127.0.0.1]:48470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIntX-0003UU-Ox for incoming@patchwork.ozlabs.org; Thu, 10 Dec 2009 13:37:43 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInWd-0005Gu-Iy for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInWb-0005ED-Mi for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:03 -0500 Received: from [199.232.76.173] (port=41854 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInWb-0005Dz-Hr for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25186) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInWc-0003iN-1m for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:14:02 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBAIDxVh031679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Dec 2009 13:13:59 -0500 Received: from redhat.com (vpn-6-118.tlv.redhat.com [10.35.6.118]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nBAIDvDK015347; Thu, 10 Dec 2009 13:13:58 -0500 Date: Thu, 10 Dec 2009 20:11:15 +0200 From: "Michael S. Tsirkin" To: Anthony Liguori , qemu-devel@nongnu.org Message-ID: <20091210181115.GM25707@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 12/17] es1370: symbolic names for pci registers 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 No functional changes. I verified that the generated binary does not change. Signed-off-by: Michael S. Tsirkin --- hw/es1370.c | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/es1370.c b/hw/es1370.c index c358253..40cb48c 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -1000,27 +1000,28 @@ static int es1370_initfn (PCIDevice *dev) pci_config_set_vendor_id (c, PCI_VENDOR_ID_ENSONIQ); pci_config_set_device_id (c, PCI_DEVICE_ID_ENSONIQ_ES1370); - c[0x07] = 2 << 1; + c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_SLOW >> 8; pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO); #if 1 - c[0x2c] = 0x42; - c[0x2d] = 0x49; - c[0x2e] = 0x4c; - c[0x2f] = 0x4c; + c[PCI_SUBSYSTEM_VENDOR_ID] = 0x42; + c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x49; + c[PCI_SUBSYSTEM_ID] = 0x4c; + c[PCI_SUBSYSTEM_ID + 1] = 0x4c; #else - c[0x2c] = 0x74; - c[0x2d] = 0x12; - c[0x2e] = 0x71; - c[0x2f] = 0x13; - c[0x34] = 0xdc; - c[0x3c] = 10; + c[PCI_SUBSYSTEM_VENDOR_ID] = 0x74; + c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x12; + c[PCI_SUBSYSTEM_ID] = 0x71; + c[PCI_SUBSYSTEM_ID + 1] = 0x13; + c[PCI_CAPABILITY_LIST] = 0xdc; + c[PCI_INTERRUPT_LINE] = 10; c[0xdc] = 0x00; #endif - c[0x3d] = 1; - c[0x3e] = 0x0c; - c[0x3f] = 0x80; + /* TODO: RST# value should be 0. */ + c[PCI_INTERRUPT_PIN] = 1; + c[PCI_MIN_GNT] = 0x0c; + c[PCI_MAX_LAT] = 0x80; pci_register_bar (&s->dev, 0, 256, PCI_BASE_ADDRESS_SPACE_IO, es1370_map); qemu_register_reset (es1370_on_reset, s);