]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
pci: Use #defines for PCI vendors.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 10 Mar 2014 16:53:52 +0000 (12:53 -0400)
committerKeir Fraser <keir@xen.org>
Thu, 13 Mar 2014 10:21:24 +0000 (10:21 +0000)
Instead of having hard-coded values. We only do PCI vendors
as Jan requested and put all PCI device vendors in one
new file.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v1: Sorted them based on their numerical values per Jan's review]
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/oprofile/op_model_athlon.c
xen/arch/x86/x86_64/mmconf-fam10h.c
xen/arch/x86/x86_64/mmconfig-shared.c
xen/arch/x86/x86_64/mmconfig.h
xen/drivers/char/ns16550.c
xen/include/xen/pci_ids.h [new file with mode: 0644]

index ad84768dce6ccfae111b275edcd99948585d2ad8..204343d99a23746b27deef1b0d84fce6e1264552 100644 (file)
@@ -20,7 +20,8 @@
 #include <asm/current.h>
 #include <asm/hvm/support.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_ids.h>
+
 #include "op_x86_model.h"
 #include "op_counter.h"
 
@@ -445,7 +446,6 @@ static inline void __init init_ibs_nmi_per_cpu(void *arg)
        apic_write(reg, APIC_EILVT_MSG_NMI << 8);
 }
 
-#define PCI_VENDOR_ID_AMD               0x1022
 #define PCI_DEVICE_ID_AMD_10H_NB_MISC   0x1203
 #define IBSCTL                          0x1cc
 static int __init init_ibs_nmi(void)
index 1373acb7df6d27db387156a3a3a66c54aca6b6e6..65260f6da6c031b292a32b799d2ed88ce95bcb27 100644 (file)
@@ -6,6 +6,7 @@
 #include <xen/acpi.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_ids.h>
 #include <xen/init.h>
 #include <xen/dmi.h>
 #include <asm/amd.h>
index 7589b64b60cc0d2e84de3828036d23b5bc47679f..742bc1862f06f1ef0f25b340d944775e79a6ca54 100644 (file)
@@ -19,6 +19,7 @@
 #include <xen/xmalloc.h>
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_ids.h>
 #include <asm/e820.h>
 #include <asm/msr.h>
 #include <asm/msr-index.h>
index 36e04486b51506221f631aa15c2732a85e7c70a2..c447e5a006d8fdda5e890ab622e47e8fbe1658c6 100644 (file)
@@ -17,7 +17,6 @@
  * Author: Allen Kay <allen.m.kay@intel.com> - adapted from linux
  */
 
-#define PCI_VENDOR_ID_INTEL        0x8086
 #define PCI_DEVICE_ID_INTEL_E7520_MCH    0x3590
 #define PCI_DEVICE_ID_INTEL_82945G_HB    0x2770
 
 #define PCI_PROBE_MASK        0x000f
 #define PCI_PROBE_NOEARLY    0x0010
 
-#define PCI_VENDOR_ID_AMD             0x1022
 #define PCI_CHECK_ENABLE_AMD_MMCONF     0x20000
 
-#define PCI_VENDOR_ID_NVIDIA       0x10de
-
 extern unsigned int pci_probe;
 
 /*
index 66d10f70d02f54b33733f9ffaa05f40c3ef45d61..fd66238efb7928a3503a9baede466b89dedb92c5 100644 (file)
@@ -19,6 +19,7 @@
 #ifdef HAS_PCI
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
+#include <xen/pci_ids.h>
 #endif
 #include <xen/8250-uart.h>
 #include <xen/vmap.h>
@@ -135,13 +136,13 @@ static const struct ns16550_config_mmio __initconst uart_config[] =
 {
     /* Broadcom TruManage device */
     {
-        .vendor_id = 0x14e4,
+        .vendor_id = PCI_VENDOR_ID_BROADCOM,
         .dev_id = 0x160a,
         .param = param_trumanage,
     },
     /* OXPCIe952 1 Native UART  */
     {
-        .vendor_id = 0x1415,
+        .vendor_id = PCI_VENDOR_ID_OXSEMI,
         .dev_id = 0xc138,
         .param = param_oxford,
     }
diff --git a/xen/include/xen/pci_ids.h b/xen/include/xen/pci_ids.h
new file mode 100644 (file)
index 0000000..f5b1d94
--- /dev/null
@@ -0,0 +1,9 @@
+#define PCI_VENDOR_ID_AMD                0x1022
+
+#define PCI_VENDOR_ID_NVIDIA             0x10de
+
+#define PCI_VENDOR_ID_OXSEMI             0x1415
+
+#define PCI_VENDOR_ID_BROADCOM           0x14e4
+
+#define PCI_VENDOR_ID_INTEL              0x8086