From patchwork Thu Dec 10 18:11:06 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: 40860 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 7F325B6F07 for ; Fri, 11 Dec 2009 05:34:10 +1100 (EST) Received: from localhost ([127.0.0.1]:53033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInq2-00016o-OR for incoming@patchwork.ozlabs.org; Thu, 10 Dec 2009 13:34:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInWW-00056q-Gb for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInWS-00051A-S8 for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:56 -0500 Received: from [199.232.76.173] (port=41848 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInWS-00050x-HK for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65146) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInWS-0003hB-LX for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:53 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBAIDo2m016998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Dec 2009 13:13:50 -0500 Received: from redhat.com (vpn-6-118.tlv.redhat.com [10.35.6.118]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nBAIDmen000656; Thu, 10 Dec 2009 13:13:48 -0500 Date: Thu, 10 Dec 2009 20:11:06 +0200 From: "Michael S. Tsirkin" To: Anthony Liguori , qemu-devel@nongnu.org Message-ID: <20091210181106.GK25707@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.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 10/17] lsi: 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/lsi53c895a.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 014c85d..463a889 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -2120,18 +2120,20 @@ static int lsi_scsi_init(PCIDevice *dev) /* PCI base class code */ pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_SCSI); /* PCI subsystem ID */ - pci_conf[0x2e] = 0x00; - pci_conf[0x2f] = 0x10; + pci_conf[PCI_SUBSYSTEM_ID] = 0x00; + pci_conf[PCI_SUBSYSTEM_ID + 1] = 0x10; /* PCI latency timer = 255 */ - pci_conf[0x0d] = 0xff; + pci_conf[PCI_LATENCY_TIMER] = 0xff; + /* TODO: RST# value should be 0 */ /* Interrupt pin 1 */ - pci_conf[0x3d] = 0x01; + pci_conf[PCI_INTERRUPT_PIN] = 0x01; s->mmio_io_addr = cpu_register_io_memory(lsi_mmio_readfn, lsi_mmio_writefn, s); s->ram_io_addr = cpu_register_io_memory(lsi_ram_readfn, lsi_ram_writefn, s); + /* TODO: use dev and get rid of cast below */ pci_register_bar((struct PCIDevice *)s, 0, 256, PCI_BASE_ADDRESS_SPACE_IO, lsi_io_mapfunc); pci_register_bar((struct PCIDevice *)s, 1, 0x400,