aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/i7core_edac.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 2aacd951d41..c05e1ada7a3 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -221,7 +221,9 @@ struct i7core_inject {
221}; 221};
222 222
223struct i7core_channel { 223struct i7core_channel {
224 u32 ranks; 224 bool is_3dimms_present;
225 bool is_single_4rank;
226 bool has_4rank;
225 u32 dimms; 227 u32 dimms;
226}; 228};
227 229
@@ -555,21 +557,20 @@ static int get_dimm_config(struct mem_ctl_info *mci)
555 pci_read_config_dword(pvt->pci_ch[i][0], 557 pci_read_config_dword(pvt->pci_ch[i][0],
556 MC_CHANNEL_DIMM_INIT_PARAMS, &data); 558 MC_CHANNEL_DIMM_INIT_PARAMS, &data);
557 559
558 pvt->channel[i].ranks = (data & QUAD_RANK_PRESENT) ? 560
559 4 : 2; 561 if (data & THREE_DIMMS_PRESENT)
562 pvt->channel[i].is_3dimms_present = true;
563
564 if (data & SINGLE_QUAD_RANK_PRESENT)
565 pvt->channel[i].is_single_4rank = true;
566
567 if (data & QUAD_RANK_PRESENT)
568 pvt->channel[i].has_4rank = true;
560 569
561 if (data & REGISTERED_DIMM) 570 if (data & REGISTERED_DIMM)
562 mtype = MEM_RDDR3; 571 mtype = MEM_RDDR3;
563 else 572 else
564 mtype = MEM_DDR3; 573 mtype = MEM_DDR3;
565#if 0
566 if (data & THREE_DIMMS_PRESENT)
567 pvt->channel[i].dimms = 3;
568 else if (data & SINGLE_QUAD_RANK_PRESENT)
569 pvt->channel[i].dimms = 1;
570 else
571 pvt->channel[i].dimms = 2;
572#endif
573 574
574 /* Devices 4-6 function 1 */ 575 /* Devices 4-6 function 1 */
575 pci_read_config_dword(pvt->pci_ch[i][1], 576 pci_read_config_dword(pvt->pci_ch[i][1],
@@ -580,11 +581,13 @@ static int get_dimm_config(struct mem_ctl_info *mci)
580 MC_DOD_CH_DIMM2, &dimm_dod[2]); 581 MC_DOD_CH_DIMM2, &dimm_dod[2]);
581 582
582 debugf0("Ch%d phy rd%d, wr%d (0x%08x): " 583 debugf0("Ch%d phy rd%d, wr%d (0x%08x): "
583 "%d ranks, %cDIMMs\n", 584 "%s%s%s%cDIMMs\n",
584 i, 585 i,
585 RDLCH(pvt->info.ch_map, i), WRLCH(pvt->info.ch_map, i), 586 RDLCH(pvt->info.ch_map, i), WRLCH(pvt->info.ch_map, i),
586 data, 587 data,
587 pvt->channel[i].ranks, 588 pvt->channel[i].is_3dimms_present ? "3DIMMS " : "",
589 pvt->channel[i].is_3dimms_present ? "SINGLE_4R " : "",
590 pvt->channel[i].has_4rank ? "HAS_4R " : "",
588 (data & REGISTERED_DIMM) ? 'R' : 'U'); 591 (data & REGISTERED_DIMM) ? 'R' : 'U');
589 592
590 for (j = 0; j < 3; j++) { 593 for (j = 0; j < 3; j++) {