aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-07-10 17:39:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 10:44:51 -0400
commitd1fd4fb69eeeb7db0693df58b9116db498d5bfe1 (patch)
treee3870ec2d0c20804c2865a67c606acf8a736c01c
parent5707b24a50b40582226618c56692af932db9fe02 (diff)
i7core_edac: Add a code to probe Xeon 55xx bus
This code changes the detection procedure of i7core_edac. Instead of directly probing for MC registers, it probes for another register found on Nehalem. If found, it tries to pick the first MC PCI BUS. This should work fine with Xeon 35xx, but, on Xeon 55xx, this is at bus 254 and 255 that are not properly detected by the non-legacy PCI methods. The new detection code scans specifically at buses 254 and 255 for the Xeon 55xx devices. This code has not tested yet. After working, a change at the code will be needed, since the i7core is not yet ready for working with 2 sets of MC. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--arch/x86/pci/legacy.c1
-rw-r--r--drivers/edac/i7core_edac.c17
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h1
4 files changed, 16 insertions, 4 deletions
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index c734c277b116..d6cc2eddf339 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -57,6 +57,7 @@ void pcibios_scan_specific_bus(int busn)
57 } 57 }
58 } 58 }
59} 59}
60EXPORT_SYMBOL_GPL(pcibios_scan_specific_bus);
60 61
61int __init pci_subsys_init(void) 62int __init pci_subsys_init(void)
62{ 63{
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 26cd5c924d56..eec0c13c0205 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -221,15 +221,15 @@ struct i7core_dev_info {
221 .dev_id = (device_id) 221 .dev_id = (device_id)
222 222
223struct pci_id_descr pci_devs[] = { 223struct pci_id_descr pci_devs[] = {
224 /* Generic Non-core registers */
225 { PCI_DESCR(0, 0, PCI_DEVICE_ID_INTEL_I7_NOCORE) },
226
224 /* Memory controller */ 227 /* Memory controller */
225 { PCI_DESCR(3, 0, PCI_DEVICE_ID_INTEL_I7_MCR) }, 228 { PCI_DESCR(3, 0, PCI_DEVICE_ID_INTEL_I7_MCR) },
226 { PCI_DESCR(3, 1, PCI_DEVICE_ID_INTEL_I7_MC_TAD) }, 229 { PCI_DESCR(3, 1, PCI_DEVICE_ID_INTEL_I7_MC_TAD) },
227 { PCI_DESCR(3, 2, PCI_DEVICE_ID_INTEL_I7_MC_RAS) }, /* if RDIMM is supported */ 230 { PCI_DESCR(3, 2, PCI_DEVICE_ID_INTEL_I7_MC_RAS) }, /* if RDIMM is supported */
228 { PCI_DESCR(3, 4, PCI_DEVICE_ID_INTEL_I7_MC_TEST) }, 231 { PCI_DESCR(3, 4, PCI_DEVICE_ID_INTEL_I7_MC_TEST) },
229 232
230 /* Generic Non-core registers */
231 { PCI_DESCR(0, 0, PCI_DEVICE_ID_INTEL_I7_NOCORE) },
232
233 /* Channel 0 */ 233 /* Channel 0 */
234 { PCI_DESCR(4, 0, PCI_DEVICE_ID_INTEL_I7_MC_CH0_CTRL) }, 234 { PCI_DESCR(4, 0, PCI_DEVICE_ID_INTEL_I7_MC_CH0_CTRL) },
235 { PCI_DESCR(4, 1, PCI_DEVICE_ID_INTEL_I7_MC_CH0_ADDR) }, 235 { PCI_DESCR(4, 1, PCI_DEVICE_ID_INTEL_I7_MC_CH0_ADDR) },
@@ -255,7 +255,7 @@ struct pci_id_descr pci_devs[] = {
255 * This should match the first device at pci_devs table 255 * This should match the first device at pci_devs table
256 */ 256 */
257static const struct pci_device_id i7core_pci_tbl[] __devinitdata = { 257static const struct pci_device_id i7core_pci_tbl[] __devinitdata = {
258 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_I7_MCR)}, 258 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X58_HUB_MGMT)},
259 {0,} /* 0 terminated list. */ 259 {0,} /* 0 terminated list. */
260}; 260};
261 261
@@ -1069,6 +1069,15 @@ static int i7core_get_devices(void)
1069 for (i = 0; i < N_DEVS; i++) { 1069 for (i = 0; i < N_DEVS; i++) {
1070 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 1070 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
1071 pci_devs[i].dev_id, NULL); 1071 pci_devs[i].dev_id, NULL);
1072
1073 if (!pdev && !i) {
1074 pcibios_scan_specific_bus(254);
1075 pcibios_scan_specific_bus(255);
1076
1077 pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
1078 pci_devs[i].dev_id, NULL);
1079 }
1080
1072 if (likely(pdev)) 1081 if (likely(pdev))
1073 pci_devs[i].pdev = pdev; 1082 pci_devs[i].pdev = pdev;
1074 else { 1083 else {
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a788fa12ff31..5e2c7e15187d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -621,6 +621,7 @@ void pci_fixup_cardbus(struct pci_bus *);
621 621
622/* Generic PCI functions used internally */ 622/* Generic PCI functions used internally */
623 623
624void pcibios_scan_specific_bus(int busn);
624extern struct pci_bus *pci_find_bus(int domain, int busnr); 625extern struct pci_bus *pci_find_bus(int domain, int busnr);
625void pci_bus_add_devices(const struct pci_bus *bus); 626void pci_bus_add_devices(const struct pci_bus *bus);
626struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, 627struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9d5bfe86ba73..12c3da6ef14d 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2554,6 +2554,7 @@
2554#define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a 2554#define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a
2555#define PCI_DEVICE_ID_INTEL_IOAT_TBG6 0x342b 2555#define PCI_DEVICE_ID_INTEL_IOAT_TBG6 0x342b
2556#define PCI_DEVICE_ID_INTEL_IOAT_TBG7 0x342c 2556#define PCI_DEVICE_ID_INTEL_IOAT_TBG7 0x342c
2557#define PCI_DEVICE_ID_INTEL_X58_HUB_MGMT 0x342e
2557#define PCI_DEVICE_ID_INTEL_IOAT_TBG0 0x3430 2558#define PCI_DEVICE_ID_INTEL_IOAT_TBG0 0x3430
2558#define PCI_DEVICE_ID_INTEL_IOAT_TBG1 0x3431 2559#define PCI_DEVICE_ID_INTEL_IOAT_TBG1 0x3431
2559#define PCI_DEVICE_ID_INTEL_IOAT_TBG2 0x3432 2560#define PCI_DEVICE_ID_INTEL_IOAT_TBG2 0x3432