qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	kvm-devel <kvm@vger.kernel.org>
Subject: [Qemu-devel] [PATCH 3/3] qemu: cleanup unused macros in cirrus
Date: Thu, 8 Oct 2009 16:52:47 +0200	[thread overview]
Message-ID: <20091008145247.GD12275@redhat.com> (raw)
In-Reply-To: <cover.1255013225.git.mst@redhat.com>

Cirrus vga has a copy of many PCI macros,
and it doesn't even use them. Clean up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/cirrus_vga.c |   37 +------------------------------------
 1 files changed, 1 insertions(+), 36 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index c54ac65..ff90e0b 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -172,41 +172,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_SERR                    0x0100
-#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)
@@ -3248,8 +3213,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 */
-- 
1.6.5.rc2

  parent reply	other threads:[~2009-10-08 14:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1255013225.git.mst@redhat.com>
2009-10-08 14:52 ` [Qemu-devel] [PATCH 1/3] pc-bios: enable io/memory unconditionally Michael S. Tsirkin
2009-10-08 14:52 ` [Qemu-devel] [PATCH 2/3] qemu: make cirrus init value pci spec compliant Michael S. Tsirkin
2009-10-08 15:29   ` [Qemu-devel] " Avi Kivity
2009-10-08 16:06     ` Michael S. Tsirkin
2009-10-08 16:13       ` Avi Kivity
2009-10-08 18:40         ` Jamie Lokier
2009-10-08 19:39           ` Michael S. Tsirkin
2009-10-09  6:43           ` Michael S. Tsirkin
2009-10-09  7:00             ` Gleb Natapov
2009-10-09 10:13               ` Michael S. Tsirkin
2009-10-09 11:49                 ` Gleb Natapov
2009-10-09 12:59                   ` Michael S. Tsirkin
2009-10-09 15:08                     ` Gleb Natapov
2009-10-12 13:45                   ` Gerd Hoffmann
2009-10-12 13:53                     ` Gleb Natapov
2009-10-12 14:50                       ` Gerd Hoffmann
2009-10-12 14:52                         ` Gleb Natapov
2009-10-12 15:21                           ` Jamie Lokier
2009-10-12 15:43                           ` Gerd Hoffmann
2009-10-12 16:57                             ` Michael S. Tsirkin
2009-10-09 11:37             ` Jamie Lokier
2009-10-09 11:54               ` Gleb Natapov
2009-10-11 13:36           ` Michael S. Tsirkin
2009-10-11 13:45             ` Gleb Natapov
2009-10-11 13:52               ` Michael S. Tsirkin
2009-10-11 13:57                 ` Gleb Natapov
2009-10-11 14:35                   ` Michael S. Tsirkin
2009-10-11 14:39                     ` Gleb Natapov
2009-10-11 14:45                       ` Michael S. Tsirkin
2009-10-11 15:00                         ` Gleb Natapov
2009-10-12 13:44                       ` Anthony Liguori
2009-10-12 14:21                         ` Gleb Natapov
2009-10-12 14:31                           ` Anthony Liguori
2009-10-12 15:00                         ` Kevin O'Connor
2009-10-11 14:42                     ` Avi Kivity
2009-10-11 14:44                       ` Michael S. Tsirkin
2009-10-11 14:53                         ` Avi Kivity
2009-10-11 16:12                           ` Michael S. Tsirkin
2009-10-11 16:24                             ` Avi Kivity
2009-10-11 16:33                               ` Michael S. Tsirkin
2009-10-11 16:37                                 ` Avi Kivity
2009-10-11 16:39                                   ` Michael S. Tsirkin
2009-10-11 16:48                                     ` Avi Kivity
2009-10-11 17:18                                       ` Michael S. Tsirkin
2009-10-11 17:27                                         ` Avi Kivity
2009-10-11 17:28                                           ` Avi Kivity
2009-10-11 18:10                                             ` Michael S. Tsirkin
2009-10-11 20:41                                               ` Avi Kivity
2009-10-08 14:52 ` Michael S. Tsirkin [this message]
     [not found]   ` <m34oq9kix8.fsf@neno.mitica>
2009-10-08 16:07     ` [Qemu-devel] Re: [PATCH 3/3] qemu: cleanup unused macros in cirrus Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091008145247.GD12275@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).