From patchwork Mon Nov 30 14:49:03 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: 39808 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 4D4C11007D2 for ; Tue, 1 Dec 2009 01:54:44 +1100 (EST) Received: from localhost ([127.0.0.1]:52749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF7eD-00025F-AV for incoming@patchwork.ozlabs.org; Mon, 30 Nov 2009 09:54:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NF7bR-0001Dk-Je for qemu-devel@nongnu.org; Mon, 30 Nov 2009 09:51:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NF7bN-0001Al-5j for qemu-devel@nongnu.org; Mon, 30 Nov 2009 09:51:49 -0500 Received: from [199.232.76.173] (port=39432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NF7bM-0001Aa-NK for qemu-devel@nongnu.org; Mon, 30 Nov 2009 09:51:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64905) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NF7bM-00014E-9r for qemu-devel@nongnu.org; Mon, 30 Nov 2009 09:51:44 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAUEphP2002305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Nov 2009 09:51:43 -0500 Received: from redhat.com (vpn-6-53.tlv.redhat.com [10.35.6.53]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id nAUEpeTp025999; Mon, 30 Nov 2009 09:51:41 -0500 Date: Mon, 30 Nov 2009 16:49:03 +0200 From: "Michael S. Tsirkin" To: Avi Kivity Message-ID: <20091130144903.GC30802@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.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Anthony Liguori , "qemu-devel@nongnu.org" , kvm-devel , Juan Quintela Subject: [Qemu-devel] [PATCHv4-repost 2/2] qemu: cleanup unused macros in cirrus 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 Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. We also don't need to override header type as it is NORMAL by default. Signed-off-by: Michael S. Tsirkin --- hw/cirrus_vga.c | 36 +----------------------------------- 1 files changed, 1 insertions(+), 35 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 89ffdf9..edf0a8a 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -173,40 +173,6 @@ #define CIRRUS_MMIO_LINEDRAW_MODE 0x39 // byte #define CIRRUS_MMIO_BLTSTATUS 0x40 // byte -// PCI 0x04: command(word), 0x06(word): status -#define PCI_COMMAND_IOACCESS 0x0001 -#define PCI_COMMAND_MEMACCESS 0x0002 -#define PCI_COMMAND_BUSMASTER 0x0004 -#define PCI_COMMAND_SPECIALCYCLE 0x0008 -#define PCI_COMMAND_MEMWRITEINVALID 0x0010 -#define PCI_COMMAND_PALETTESNOOPING 0x0020 -#define PCI_COMMAND_PARITYDETECTION 0x0040 -#define PCI_COMMAND_ADDRESSDATASTEPPING 0x0080 -#define PCI_COMMAND_BACKTOBACKTRANS 0x0200 -// PCI 0x08, 0xff000000 (0x09-0x0b:class,0x08:rev) -#define PCI_CLASS_BASE_DISPLAY 0x03 -// PCI 0x08, 0x00ff0000 -#define PCI_CLASS_SUB_VGA 0x00 -// PCI 0x0c, 0x00ff0000 (0x0c:cacheline,0x0d:latency,0x0e:headertype,0x0f:Built-in self test) -// 0x10-0x3f (headertype 00h) -// PCI 0x10,0x14,0x18,0x1c,0x20,0x24: base address mapping registers -// 0x10: MEMBASE, 0x14: IOBASE(hard-coded in XFree86 3.x) -#define PCI_MAP_MEM 0x0 -#define PCI_MAP_IO 0x1 -#define PCI_MAP_MEM_ADDR_MASK (~0xf) -#define PCI_MAP_IO_ADDR_MASK (~0x3) -#define PCI_MAP_MEMFLAGS_32BIT 0x0 -#define PCI_MAP_MEMFLAGS_32BIT_1M 0x1 -#define PCI_MAP_MEMFLAGS_64BIT 0x4 -#define PCI_MAP_MEMFLAGS_CACHEABLE 0x8 -// PCI 0x28: cardbus CIS pointer -// PCI 0x2c: subsystem vendor id, 0x2e: subsystem id -// PCI 0x30: expansion ROM base address -#define PCI_ROMBIOS_ENABLED 0x1 -// PCI 0x34: 0xffffff00=reserved, 0x000000ff=capabilities pointer -// PCI 0x38: reserved -// PCI 0x3c: 0x3c=int-line, 0x3d=int-pin, 0x3e=min-gnt, 0x3f=maax-lat - #define CIRRUS_PNPMMIO_SIZE 0x1000 #define ABS(a) ((signed)(a) > 0 ? a : -a) @@ -3249,8 +3215,8 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) /* setup PCI */ pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS); pci_config_set_device_id(pci_conf, device_id); + //pci_conf[0x04] = PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS; pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA); - pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; /* setup memory space */ /* memory #0 LFB */