aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-10-14 10:21:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-10 11:18:28 -0400
commit52a2e4fc3712d12888decd386d78ad526078a1fa (patch)
treefd2a42325af8eaaa0262aaeb4de6d9c34e608895
parent4f7b9e7cbe68c97dbe1266709ecfc8b807b0d0ee (diff)
i7core_edac: Add initial support for Lynnfield
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/edac/i7core_edac.c39
-rw-r--r--include/linux/pci_ids.h15
2 files changed, 52 insertions, 2 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index e944b63d9f06..e525d571cb25 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -299,11 +299,30 @@ struct pci_id_descr pci_dev_descr_i7core[] = {
299 299
300}; 300};
301 301
302struct pci_id_descr pci_dev_descr_lynnfield[] = {
303 { PCI_DESCR( 3, 0, PCI_DEVICE_ID_INTEL_LYNNFIELD_MCR) },
304 { PCI_DESCR( 3, 1, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TAD) },
305 { PCI_DESCR( 3, 4, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST) },
306
307 { PCI_DESCR( 4, 0, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_CTRL) },
308 { PCI_DESCR( 4, 1, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_ADDR) },
309 { PCI_DESCR( 4, 2, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_RANK) },
310 { PCI_DESCR( 4, 3, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_TC) },
311
312 { PCI_DESCR( 4, 0, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_CTRL) },
313 { PCI_DESCR( 4, 1, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_ADDR) },
314 { PCI_DESCR( 4, 2, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_RANK) },
315 { PCI_DESCR( 4, 3, PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_TC) },
316
317 { PCI_DESCR( 0, 0, PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE) },
318};
319
302/* 320/*
303 * pci_device_id table for which devices we are looking for 321 * pci_device_id table for which devices we are looking for
304 */ 322 */
305static const struct pci_device_id i7core_pci_tbl[] __devinitdata = { 323static const struct pci_device_id i7core_pci_tbl[] __devinitdata = {
306 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X58_HUB_MGMT)}, 324 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_X58_HUB_MGMT)},
325 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE)},
307 {0,} /* 0 terminated list. */ 326 {0,} /* 0 terminated list. */
308}; 327};
309 328
@@ -522,6 +541,9 @@ static int get_dimm_config(struct mem_ctl_info *mci, int *csrow)
522 for (i = 0; i < NUM_CHANS; i++) { 541 for (i = 0; i < NUM_CHANS; i++) {
523 u32 data, dimm_dod[3], value[8]; 542 u32 data, dimm_dod[3], value[8];
524 543
544 if (!pvt->pci_ch[i][0])
545 continue;
546
525 if (!CH_ACTIVE(pvt, i)) { 547 if (!CH_ACTIVE(pvt, i)) {
526 debugf0("Channel %i is not active\n", i); 548 debugf0("Channel %i is not active\n", i);
527 continue; 549 continue;
@@ -1001,6 +1023,9 @@ static ssize_t i7core_inject_enable_show(struct mem_ctl_info *mci,
1001 struct i7core_pvt *pvt = mci->pvt_info; 1023 struct i7core_pvt *pvt = mci->pvt_info;
1002 u32 injectmask; 1024 u32 injectmask;
1003 1025
1026 if (!pvt->pci_ch[pvt->inject.channel][0])
1027 return 0;
1028
1004 pci_read_config_dword(pvt->pci_ch[pvt->inject.channel][0], 1029 pci_read_config_dword(pvt->pci_ch[pvt->inject.channel][0],
1005 MC_CHANNEL_ERROR_INJECT, &injectmask); 1030 MC_CHANNEL_ERROR_INJECT, &injectmask);
1006 1031
@@ -1841,8 +1866,18 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
1841 /* get the pci devices we want to reserve for our use */ 1866 /* get the pci devices we want to reserve for our use */
1842 mutex_lock(&i7core_edac_lock); 1867 mutex_lock(&i7core_edac_lock);
1843 1868
1844 rc = i7core_get_devices(pci_dev_descr_i7core, 1869 if (pdev->device == PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE) {
1845 ARRAY_SIZE(pci_dev_descr_i7core)); 1870 printk(KERN_INFO "i7core_edac: detected a "
1871 "Lynnfield processor\n");
1872 rc = i7core_get_devices(pci_dev_descr_lynnfield,
1873 ARRAY_SIZE(pci_dev_descr_lynnfield));
1874 } else {
1875 printk(KERN_INFO "i7core_edac: detected a "
1876 "Nehalem/Nehalem-EP processor\n");
1877 rc = i7core_get_devices(pci_dev_descr_i7core,
1878 ARRAY_SIZE(pci_dev_descr_i7core));
1879 }
1880
1846 if (unlikely(rc < 0)) 1881 if (unlikely(rc < 0))
1847 goto fail0; 1882 goto fail0;
1848 1883
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 382476a8a339..ebc0fa4c7a66 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2550,6 +2550,21 @@
2550#define PCI_DEVICE_ID_INTEL_I7_MC_CH2_TC 0x2c33 2550#define PCI_DEVICE_ID_INTEL_I7_MC_CH2_TC 0x2c33
2551#define PCI_DEVICE_ID_INTEL_I7_NONCORE 0x2c41 2551#define PCI_DEVICE_ID_INTEL_I7_NONCORE 0x2c41
2552#define PCI_DEVICE_ID_INTEL_I7_NONCORE_ALT 0x2c40 2552#define PCI_DEVICE_ID_INTEL_I7_NONCORE_ALT 0x2c40
2553#define PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE 0x2c50
2554#define PCI_DEVICE_ID_INTEL_LYNNFIELD_SAD 0x2c81
2555#define PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_LINK0 0x2c90
2556#define PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_PHY0 0x2c91
2557#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MCR 0x2c98
2558#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TAD 0x2c99
2559#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST 0x2c9C
2560#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_CTRL 0x2ca0
2561#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_ADDR 0x2ca1
2562#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_RANK 0x2ca2
2563#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_TC 0x2ca3
2564#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_CTRL 0x2ca8
2565#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_ADDR 0x2ca9
2566#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_RANK 0x2caa
2567#define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH1_TC 0x2cab
2553#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 2568#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
2554#define PCI_DEVICE_ID_INTEL_IOAT_TBG4 0x3429 2569#define PCI_DEVICE_ID_INTEL_IOAT_TBG4 0x3429
2555#define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a 2570#define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a