Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174465
b: refs/heads/master
c: d16149e
h: refs/heads/master
i:
  174463: 9aae02c
v: v3
  • Loading branch information
Borislav Petkov committed Dec 7, 2009
1 parent b07a1b5 commit 84e0987
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8566c4df1690f3862ae338a4c533f4bb5a863f9a
refs/heads/master: d16149e8c378ab7011e600980af51d2477aa5307
18 changes: 7 additions & 11 deletions trunk/drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,28 +1204,21 @@ static int f10_early_channel_count(struct amd64_pvt *pvt)
int i, j, channels = 0;
u32 dbam;

if (amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_0, &pvt->dclr0))
goto err_reg;

if (amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_1, &pvt->dclr1))
goto err_reg;

/* If we are in 128 bit mode, then we are using 2 channels */
if (pvt->dclr0 & F10_WIDTH_128) {
debugf0("Data WIDTH is 128 bits - 2 channels\n");
channels = 2;
return channels;
}

/*
* Need to check if in UN-ganged mode: In such, there are 2 channels,
* but they are NOT in 128 bit mode and thus the above 'dcl0' status bit
* will be OFF.
* Need to check if in unganged mode: In such, there are 2 channels,
* but they are not in 128 bit mode and thus the above 'dclr0' status
* bit will be OFF.
*
* Need to check DCT0[0] and DCT1[0] to see if only one of them has
* their CSEnable bit on. If so, then SINGLE DIMM case.
*/
debugf0("Data WIDTH is NOT 128 bits - need more decoding\n");
debugf0("Data width is not 128 bits - need more decoding\n");

/*
* Check DRAM Bank Address Mapping values for each DIMM to see if there
Expand All @@ -1244,6 +1237,9 @@ static int f10_early_channel_count(struct amd64_pvt *pvt)
}
}

if (channels > 2)
channels = 2;

debugf0("MCT channel count: %d\n", channels);

return channels;
Expand Down

0 comments on commit 84e0987

Please sign in to comment.