From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ldp2s-0005Zt-BT for qemu-devel@nongnu.org; Sun, 01 Mar 2009 12:01:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ldp2r-0005ZB-FX for qemu-devel@nongnu.org; Sun, 01 Mar 2009 12:01:41 -0500 Received: from [199.232.76.173] (port=47659 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ldp2q-0005Yz-Nd for qemu-devel@nongnu.org; Sun, 01 Mar 2009 12:01:40 -0500 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:30621) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ldp2p-0006jM-SW for qemu-devel@nongnu.org; Sun, 01 Mar 2009 12:01:40 -0500 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090301170123.KQHF4080.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com> for ; Sun, 1 Mar 2009 17:01:23 +0000 Received: from miranda.arrow ([213.107.21.171]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090301170123.YRDL2093.aamtaout03-winn.ispmail.ntl.com@miranda.arrow> for ; Sun, 1 Mar 2009 17:01:23 +0000 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1Ldp2W-0000Ay-Tb for qemu-devel@nongnu.org; Sun, 01 Mar 2009 17:01:20 +0000 Date: Sun, 1 Mar 2009 17:01:20 +0000 From: Stuart Brady Message-ID: <20090301170120.GA666@miranda.arrow> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] Add and use remaining #defines for PCI device IDs Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch adds and uses #defines for the remaining hardcoded PCI device IDs. It also marks in hw/pci.h those IDs that have not been taken from linux/pci_ids.h, and removes the 'RTL' from PCI_DEVICE_ID_REALTEK_RTL8029. Signed-off-by: Stuart Brady Index: hw/sh_pci.c =================================================================== --- hw/sh_pci.c (revision 6657) +++ hw/sh_pci.c (working copy) @@ -189,7 +189,7 @@ cpu_register_physical_memory(0xfd000000, 0x1000000, mem); pci_config_set_vendor_id(p->dev->config, PCI_VENDOR_ID_HITACHI); - pci_config_set_device_id(p->dev->config, 0x350e); // SH7751R + pci_config_set_device_id(p->dev->config, PCI_DEVICE_ID_HITACHI_SH7751R); p->dev->config[0x04] = 0x80; p->dev->config[0x05] = 0x00; p->dev->config[0x06] = 0x90; Index: hw/usb-ohci.c =================================================================== --- hw/usb-ohci.c (revision 6657) +++ hw/usb-ohci.c (working copy) @@ -1680,7 +1680,8 @@ } pci_config_set_vendor_id(ohci->pci_dev.config, PCI_VENDOR_ID_APPLE); - pci_config_set_device_id(ohci->pci_dev.config, 0x003f); // device_id + pci_config_set_device_id(ohci->pci_dev.config, + PCI_DEVICE_ID_APPLE_IPID_USB); ohci->pci_dev.config[0x09] = 0x10; /* OHCI */ pci_config_set_class(ohci->pci_dev.config, PCI_CLASS_SERIAL_USB); ohci->pci_dev.config[0x3d] = 0x01; /* interrupt pin 1 */ Index: hw/pci.h =================================================================== --- hw/pci.h (revision 6657) +++ hw/pci.h (working copy) @@ -54,23 +54,26 @@ #define PCI_VENDOR_ID_CIRRUS 0x1013 #define PCI_VENDOR_ID_IBM 0x1014 -#define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff +#define PCI_DEVICE_ID_IBM_440GX 0x027f // * +#define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff // * #define PCI_VENDOR_ID_AMD 0x1022 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 -#define PCI_VENDOR_ID_HITACHI 0x1054 +#define PCI_VENDOR_ID_HITACHI 0x1054 // * +#define PCI_DEVICE_ID_HITACHI_SH7751R 0x350e // * #define PCI_VENDOR_ID_MOTOROLA 0x1057 #define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 #define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 #define PCI_VENDOR_ID_APPLE 0x106b -#define PCI_DEVICE_ID_APPLE_343S1201 0x0010 -#define PCI_DEVICE_ID_APPLE_UNI_N_I_PCI 0x001e -#define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f +#define PCI_DEVICE_ID_APPLE_343S1201 0x0010 // * +#define PCI_DEVICE_ID_APPLE_UNI_N_I_PCI 0x001e // * +#define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f // * #define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 -#define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 +#define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 // * +#define PCI_DEVICE_ID_APPLE_IPID_USB 0x003f // * #define PCI_VENDOR_ID_SUN 0x108e #define PCI_DEVICE_ID_SUN_EBUS 0x1000 @@ -81,27 +84,30 @@ #define PCI_DEVICE_ID_CMD_646 0x0646 #define PCI_VENDOR_ID_REALTEK 0x10ec -#define PCI_DEVICE_ID_REALTEK_RTL8029 0x8029 +#define PCI_DEVICE_ID_REALTEK_8029 0x8029 // * #define PCI_DEVICE_ID_REALTEK_8139 0x8139 #define PCI_VENDOR_ID_XILINX 0x10ee +#define PCI_DEVICE_ID_XILINX_XC2VP30 0x0300 // * #define PCI_VENDOR_ID_MARVELL 0x11ab +#define PCI_DEVICE_ID_MARVELL_GT6412X 0x4620 // * -#define PCI_VENDOR_ID_QEMU 0x1234 -#define PCI_DEVICE_ID_QEMU_VGA 0x1111 +#define PCI_VENDOR_ID_QEMU 0x1234 // * +#define PCI_DEVICE_ID_QEMU_VGA 0x1111 // * #define PCI_VENDOR_ID_ENSONIQ 0x1274 #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 -#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_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_VENDOR_ID_INTEL 0x8086 +#define PCI_DEVICE_ID_INTEL_82551IT 0x1209 // * #define PCI_DEVICE_ID_INTEL_82441 0x1237 #define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415 #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 @@ -112,6 +118,8 @@ #define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 #define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 +// * = not in linux/pci_ids.h + /* Red Hat / Qumranet (for QEMU) -- see pci-ids.txt */ #define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4 #define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4 Index: hw/eepro100.c =================================================================== --- hw/eepro100.c (revision 6657) +++ hw/eepro100.c (working copy) @@ -424,7 +424,7 @@ /* PCI Vendor ID */ pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); /* PCI Device ID */ - pci_config_set_device_id(pci_conf, 0x1209); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82551IT); /* PCI Command */ PCI_CONFIG_16(PCI_COMMAND, 0x0000); /* PCI Status */ Index: hw/ne2000.c =================================================================== --- hw/ne2000.c (revision 6657) +++ hw/ne2000.c (working copy) @@ -789,7 +789,7 @@ NULL, NULL); pci_conf = d->dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK); - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_RTL8029); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8029); pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET); pci_conf[0x0e] = 0x00; // header_type pci_conf[0x3d] = 1; // interrupt pin 0 Index: hw/versatile_pci.c =================================================================== --- hw/versatile_pci.c (revision 6657) +++ hw/versatile_pci.c (working copy) @@ -126,7 +126,7 @@ pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_XILINX); /* Both boards have the same device ID. Oh well. */ - pci_config_set_device_id(d->config, 0x0300); // device_id + pci_config_set_device_id(d->config, PCI_DEVICE_ID_XILINX_XC2VP30); d->config[0x04] = 0x00; d->config[0x05] = 0x00; d->config[0x06] = 0x20; Index: hw/ppc4xx_pci.c =================================================================== --- hw/ppc4xx_pci.c (revision 6657) +++ hw/ppc4xx_pci.c (working copy) @@ -379,7 +379,7 @@ 0, NULL, NULL); pci_conf = controller->pci_dev->config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_IBM); - pci_config_set_device_id(pci_conf, 0x027f); // device_id + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_IBM_440GX); pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER); /* CFGADDR */ Index: hw/gt64xxx.c =================================================================== --- hw/gt64xxx.c (revision 6657) +++ hw/gt64xxx.c (working copy) @@ -1137,7 +1137,7 @@ /* FIXME: Malta specific hw assumptions ahead */ pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_MARVELL); - pci_config_set_device_id(d->config, 0x4620); /* device_id */ + pci_config_set_device_id(d->config, PCI_DEVICE_ID_MARVELL_GT6412X); d->config[0x04] = 0x00; d->config[0x05] = 0x00; -- Stuart Brady