Commit c2494ace authored by Keith Mannthey's avatar Keith Mannthey Committed by Linus Torvalds

edac: i5100 fix initialization code

Allow csrows to properly initialize when the topology only has active
channels on 2 and 3.  This new check allows proper detection and
initialization in this topology.  Only checking the first mrt that
represented channels 0 and 1 is not sufficient.

I also fixed up the related debug information path.  I can submit as a 2nd
patch if needed.
Signed-off-by: default avatarKeith Mannthey <kmannth@us.ibm.com>
Acked-by: default avatarAristeu Rozanski <aris@ruivo.org>
Signed-off-by: default avatarDoug Thompson <dougthompson@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0616fb00
...@@ -1173,7 +1173,7 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci) ...@@ -1173,7 +1173,7 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci)
pci_read_config_word(pvt->branch_1, where, pci_read_config_word(pvt->branch_1, where,
&pvt->b1_mtr[slot_row]); &pvt->b1_mtr[slot_row]);
debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row,
where, pvt->b0_mtr[slot_row]); where, pvt->b1_mtr[slot_row]);
} else { } else {
pvt->b1_mtr[slot_row] = 0; pvt->b1_mtr[slot_row] = 0;
} }
...@@ -1232,7 +1232,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) ...@@ -1232,7 +1232,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
struct csrow_info *p_csrow; struct csrow_info *p_csrow;
int empty, channel_count; int empty, channel_count;
int max_csrows; int max_csrows;
int mtr; int mtr, mtr1;
int csrow_megs; int csrow_megs;
int channel; int channel;
int csrow; int csrow;
...@@ -1251,9 +1251,10 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) ...@@ -1251,9 +1251,10 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
/* use branch 0 for the basis */ /* use branch 0 for the basis */
mtr = pvt->b0_mtr[csrow >> 1]; mtr = pvt->b0_mtr[csrow >> 1];
mtr1 = pvt->b1_mtr[csrow >> 1];
/* if no DIMMS on this row, continue */ /* if no DIMMS on this row, continue */
if (!MTR_DIMMS_PRESENT(mtr)) if (!MTR_DIMMS_PRESENT(mtr) && !MTR_DIMMS_PRESENT(mtr1))
continue; continue;
/* FAKE OUT VALUES, FIXME */ /* FAKE OUT VALUES, FIXME */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment