aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2009-09-21 08:35:51 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2009-10-07 10:50:50 -0400
commit9d858bb10a9907bbbaffbb4a80a31718d548868c (patch)
tree6f5f6a61c171a6f4be7ccb447216757d34c6331b /drivers/edac/amd64_edac.h
parent2cff18c22cfaa88216a5d8c62ea64d1fb575c145 (diff)
amd64_edac: fix chip select handling
Different processor families support a different number of chip selects. Handle this in a family-dependent way with the proper values assigned at init time (see amd64_set_dct_base_and_mask). Remove _DCSM_COUNT defines since they're used at one place and originate from public documentation. CC: Keith Mannthey <kmannth@us.ibm.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index c3f769e017fa..64193927a05a 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -144,7 +144,7 @@
144#define OPTERON_CPU_REV_FA 5 144#define OPTERON_CPU_REV_FA 5
145 145
146/* Hardware limit on ChipSelect rows per MC and processors per system */ 146/* Hardware limit on ChipSelect rows per MC and processors per system */
147#define CHIPSELECT_COUNT 8 147#define MAX_CS_COUNT 8
148#define DRAM_REG_COUNT 8 148#define DRAM_REG_COUNT 8
149 149
150 150
@@ -195,7 +195,6 @@
195 */ 195 */
196#define REV_E_DCSB_BASE_BITS (0xFFE0FE00ULL) 196#define REV_E_DCSB_BASE_BITS (0xFFE0FE00ULL)
197#define REV_E_DCS_SHIFT 4 197#define REV_E_DCS_SHIFT 4
198#define REV_E_DCSM_COUNT 8
199 198
200#define REV_F_F1Xh_DCSB_BASE_BITS (0x1FF83FE0ULL) 199#define REV_F_F1Xh_DCSB_BASE_BITS (0x1FF83FE0ULL)
201#define REV_F_F1Xh_DCS_SHIFT 8 200#define REV_F_F1Xh_DCS_SHIFT 8
@@ -206,9 +205,6 @@
206 */ 205 */
207#define REV_F_DCSB_BASE_BITS (0x1FF83FE0ULL) 206#define REV_F_DCSB_BASE_BITS (0x1FF83FE0ULL)
208#define REV_F_DCS_SHIFT 8 207#define REV_F_DCS_SHIFT 8
209#define REV_F_DCSM_COUNT 4
210#define F10_DCSM_COUNT 4
211#define F11_DCSM_COUNT 2
212 208
213/* DRAM CS Mask Registers */ 209/* DRAM CS Mask Registers */
214#define K8_DCSM0 0x60 210#define K8_DCSM0 0x60
@@ -447,12 +443,12 @@ struct amd64_pvt {
447 u32 dbam1; /* DRAM Base Address Mapping reg for DCT1 */ 443 u32 dbam1; /* DRAM Base Address Mapping reg for DCT1 */
448 444
449 /* DRAM CS Base Address Registers F2x[1,0][5C:40] */ 445 /* DRAM CS Base Address Registers F2x[1,0][5C:40] */
450 u32 dcsb0[CHIPSELECT_COUNT]; 446 u32 dcsb0[MAX_CS_COUNT];
451 u32 dcsb1[CHIPSELECT_COUNT]; 447 u32 dcsb1[MAX_CS_COUNT];
452 448
453 /* DRAM CS Mask Registers F2x[1,0][6C:60] */ 449 /* DRAM CS Mask Registers F2x[1,0][6C:60] */
454 u32 dcsm0[CHIPSELECT_COUNT]; 450 u32 dcsm0[MAX_CS_COUNT];
455 u32 dcsm1[CHIPSELECT_COUNT]; 451 u32 dcsm1[MAX_CS_COUNT];
456 452
457 /* 453 /*
458 * Decoded parts of DRAM BASE and LIMIT Registers 454 * Decoded parts of DRAM BASE and LIMIT Registers
@@ -472,6 +468,7 @@ struct amd64_pvt {
472 */ 468 */
473 u32 dcsb_base; /* DCSB base bits */ 469 u32 dcsb_base; /* DCSB base bits */
474 u32 dcsm_mask; /* DCSM mask bits */ 470 u32 dcsm_mask; /* DCSM mask bits */
471 u32 cs_count; /* num chip selects (== num DCSB registers) */
475 u32 num_dcsm; /* Number of DCSM registers */ 472 u32 num_dcsm; /* Number of DCSM registers */
476 u32 dcs_mask_notused; /* DCSM notused mask bits */ 473 u32 dcs_mask_notused; /* DCSM notused mask bits */
477 u32 dcs_shift; /* DCSB and DCSM shift value */ 474 u32 dcs_shift; /* DCSB and DCSM shift value */