From mboxrd@z Thu Jan 1 00:00:00 1970 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 Date: Thu, 10 Dec 2009 20:11:15 +0200 From: "Michael S. Tsirkin" Message-ID: <20091210181115.GM25707@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] [PATCH 12/17] es1370: symbolic names for pci registers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel@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); -- 1.6.6.rc1.43.gf55cc