From patchwork Thu Dec 10 18:10:56 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: 40858 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 858F6B6F06 for ; Fri, 11 Dec 2009 05:30:23 +1100 (EST) Received: from localhost ([127.0.0.1]:50508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInmO-000709-P5 for incoming@patchwork.ozlabs.org; Thu, 10 Dec 2009 13:30:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NInWN-0004u2-Nb for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NInWJ-0004ob-1C for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:47 -0500 Received: from [199.232.76.173] (port=41846 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NInWI-0004oI-NY for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2403) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NInWJ-0003gT-5m for qemu-devel@nongnu.org; Thu, 10 Dec 2009 13:13:43 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBAIDeIa014421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Dec 2009 13:13:40 -0500 Received: from redhat.com (vpn-6-118.tlv.redhat.com [10.35.6.118]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nBAIDcQJ027642; Thu, 10 Dec 2009 13:13:39 -0500 Date: Thu, 10 Dec 2009 20:10:56 +0200 From: "Michael S. Tsirkin" To: Anthony Liguori , qemu-devel@nongnu.org Message-ID: <20091210181056.GI25707@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.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 08/17] cmd646: 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/ide/cmd646.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 3b7c606..086ff62 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -209,8 +209,8 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CMD); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_CMD_646); - pci_conf[0x08] = 0x07; // IDE controller revision - pci_conf[0x09] = 0x8f; + pci_conf[PCI_REVISION_ID] = 0x07; // IDE controller revision + pci_conf[PCI_CLASS_PROG] = 0x8f; pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE); pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type @@ -227,7 +227,8 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) pci_register_bar(dev, 3, 0x4, PCI_BASE_ADDRESS_SPACE_IO, ide_map); pci_register_bar(dev, 4, 0x10, PCI_BASE_ADDRESS_SPACE_IO, bmdma_map); - pci_conf[0x3d] = 0x01; // interrupt on pin 1 + /* TODO: RST# value should be 0 */ + pci_conf[PCI_INTERRUPT_PIN] = 0x01; // interrupt on pin 1 irq = qemu_allocate_irqs(cmd646_set_irq, d, 2); ide_bus_new(&d->bus[0], &d->dev.qdev);