diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-12-22 08:28:24 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 09:46:14 -0400 |
commit | cb32850744b8b574966637ae98d55692717eced4 (patch) | |
tree | 3052886f38108f72a5d6c60be43af68198ef2ac5 /drivers/edac/amd64_edac.h | |
parent | 525a1b20a6830317db17b62df322b45d92ecd550 (diff) |
amd64_edac: Cleanup Dram Configuration registers handling
* Restrict DCT ganged mode check since only Fam10h supports it
* Adjust DRAM type detection for BD since it only supports DDR3
* Remove second and thus unneeded DCLR read in k8_early_channel_count() - we do
that in read_mc_regs()
* Cleanup comments and remove family names from register macros
* Remove unused defines
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r-- | drivers/edac/amd64_edac.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index ba1818305943..7323f1b493ad 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h | |||
@@ -218,27 +218,23 @@ | |||
218 | 218 | ||
219 | #define DBAM_MAX_VALUE 11 | 219 | #define DBAM_MAX_VALUE 11 |
220 | 220 | ||
221 | 221 | #define DCLR0 0x90 | |
222 | #define F10_DCLR_0 0x90 | 222 | #define DCLR1 0x190 |
223 | #define F10_DCLR_1 0x190 | ||
224 | #define REVE_WIDTH_128 BIT(16) | 223 | #define REVE_WIDTH_128 BIT(16) |
225 | #define F10_WIDTH_128 BIT(11) | 224 | #define F10_WIDTH_128 BIT(11) |
226 | 225 | ||
227 | 226 | #define DCHR0 0x94 | |
228 | #define F10_DCHR_0 0x94 | 227 | #define DCHR1 0x194 |
229 | #define F10_DCHR_1 0x194 | ||
230 | |||
231 | #define F10_DCHR_FOUR_RANK_DIMM BIT(18) | ||
232 | #define DDR3_MODE BIT(8) | 228 | #define DDR3_MODE BIT(8) |
233 | #define F10_DCHR_MblMode BIT(6) | ||
234 | |||
235 | 229 | ||
236 | #define F10_DCTL_SEL_LOW 0x110 | 230 | #define F10_DCTL_SEL_LOW 0x110 |
237 | #define dct_sel_baseaddr(pvt) ((pvt->dct_sel_low) & 0xFFFFF800) | 231 | #define dct_sel_baseaddr(pvt) ((pvt->dct_sel_low) & 0xFFFFF800) |
238 | #define dct_sel_interleave_addr(pvt) (((pvt->dct_sel_low) >> 6) & 0x3) | 232 | #define dct_sel_interleave_addr(pvt) (((pvt->dct_sel_low) >> 6) & 0x3) |
239 | #define dct_high_range_enabled(pvt) (pvt->dct_sel_low & BIT(0)) | 233 | #define dct_high_range_enabled(pvt) (pvt->dct_sel_low & BIT(0)) |
240 | #define dct_interleave_enabled(pvt) (pvt->dct_sel_low & BIT(2)) | 234 | #define dct_interleave_enabled(pvt) (pvt->dct_sel_low & BIT(2)) |
241 | #define dct_ganging_enabled(pvt) (pvt->dct_sel_low & BIT(4)) | 235 | |
236 | #define dct_ganging_enabled(pvt) ((boot_cpu_data.x86 == 0x10) && ((pvt)->dct_sel_low & BIT(4))) | ||
237 | |||
242 | #define dct_data_intlv_enabled(pvt) (pvt->dct_sel_low & BIT(5)) | 238 | #define dct_data_intlv_enabled(pvt) (pvt->dct_sel_low & BIT(5)) |
243 | #define dct_dram_enabled(pvt) (pvt->dct_sel_low & BIT(8)) | 239 | #define dct_dram_enabled(pvt) (pvt->dct_sel_low & BIT(8)) |
244 | #define dct_memory_cleared(pvt) (pvt->dct_sel_low & BIT(10)) | 240 | #define dct_memory_cleared(pvt) (pvt->dct_sel_low & BIT(10)) |
@@ -262,7 +258,6 @@ | |||
262 | 258 | ||
263 | #define K8_NBSL 0x48 | 259 | #define K8_NBSL 0x48 |
264 | 260 | ||
265 | |||
266 | /* Family F10h: Normalized Extended Error Codes */ | 261 | /* Family F10h: Normalized Extended Error Codes */ |
267 | #define F10_NBSL_EXT_ERR_RES 0x0 | 262 | #define F10_NBSL_EXT_ERR_RES 0x0 |
268 | #define F10_NBSL_EXT_ERR_ECC 0x8 | 263 | #define F10_NBSL_EXT_ERR_ECC 0x8 |