diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:35 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:35 +0000 |
commit | deb54399df163e782aff00beb106f3b6a7cc9663 (patch) | |
tree | 00f99dbd1adbf0f2c7ac75befc848a454c77aefa /hw/vmware_vga.c | |
parent | 90a1e3c0b5811d6b334085d56fba1f5f47eaaea3 (diff) |
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching those
from Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1:
Introduces pci_config_set_vendor_id() / pci_config_set_device_id()
accessors as suggested by Anthony Liguori.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vmware_vga.c')
-rw-r--r-- | hw/vmware_vga.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c index 950a98c15e..1f03886033 100644 --- a/hw/vmware_vga.c +++ b/hw/vmware_vga.c @@ -1204,12 +1204,6 @@ static void pci_vmsvga_map_mem(PCIDevice *pci_dev, int region_num, iomemtype); } -#define PCI_VENDOR_ID_VMWARE 0x15ad -#define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405 -#define PCI_DEVICE_ID_VMWARE_SVGA 0x0710 -#define PCI_DEVICE_ID_VMWARE_NET 0x0720 -#define PCI_DEVICE_ID_VMWARE_SCSI 0x0730 -#define PCI_DEVICE_ID_VMWARE_IDE 0x1729 #define PCI_CLASS_BASE_DISPLAY 0x03 #define PCI_CLASS_SUB_VGA 0x00 #define PCI_CLASS_HEADERTYPE_00h 0x00 @@ -1223,10 +1217,8 @@ void pci_vmsvga_init(PCIBus *bus, uint8_t *vga_ram_base, s = (struct pci_vmsvga_state_s *) pci_register_device(bus, "QEMUware SVGA", sizeof(struct pci_vmsvga_state_s), -1, 0, 0); - s->card.config[PCI_VENDOR_ID] = PCI_VENDOR_ID_VMWARE & 0xff; - s->card.config[PCI_VENDOR_ID + 1] = PCI_VENDOR_ID_VMWARE >> 8; - s->card.config[PCI_DEVICE_ID] = SVGA_PCI_DEVICE_ID & 0xff; - s->card.config[PCI_DEVICE_ID + 1] = SVGA_PCI_DEVICE_ID >> 8; + pci_config_set_vendor_id(s->card.config, PCI_VENDOR_ID_VMWARE); + pci_config_set_device_id(s->card.config, SVGA_PCI_DEVICE_ID); s->card.config[PCI_COMMAND] = 0x07; /* I/O + Memory */ s->card.config[PCI_CLASS_DEVICE] = PCI_CLASS_SUB_VGA; s->card.config[0x0b] = PCI_CLASS_BASE_DISPLAY; |