diff options
-rw-r--r-- | drivers/edac/amd64_edac.c | 20 | ||||
-rw-r--r-- | drivers/edac/amd64_edac.h | 24 |
2 files changed, 22 insertions, 22 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 079f5b8dd5c2..495b4d506671 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -1148,11 +1148,11 @@ static u64 f10_get_error_address(struct mem_ctl_info *mci, | |||
1148 | static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) | 1148 | static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) |
1149 | { | 1149 | { |
1150 | 1150 | ||
1151 | if (!amd64_read_dct_pci_cfg(pvt, F10_DCTL_SEL_LOW, &pvt->dct_sel_low)) { | 1151 | if (!amd64_read_dct_pci_cfg(pvt, DCT_SEL_LO, &pvt->dct_sel_lo)) { |
1152 | debugf0("F2x110 (DCTL Sel. Low): 0x%08x, High range addrs at: 0x%x\n", | 1152 | debugf0("F2x110 (DCTSelLow): 0x%08x, High range addrs at: 0x%x\n", |
1153 | pvt->dct_sel_low, dct_sel_baseaddr(pvt)); | 1153 | pvt->dct_sel_lo, dct_sel_baseaddr(pvt)); |
1154 | 1154 | ||
1155 | debugf0(" DCT mode: %s, All DCTs on: %s\n", | 1155 | debugf0(" mode: %s, All DCTs on: %s\n", |
1156 | (dct_ganging_enabled(pvt) ? "ganged" : "unganged"), | 1156 | (dct_ganging_enabled(pvt) ? "ganged" : "unganged"), |
1157 | (dct_dram_enabled(pvt) ? "yes" : "no")); | 1157 | (dct_dram_enabled(pvt) ? "yes" : "no")); |
1158 | 1158 | ||
@@ -1160,18 +1160,18 @@ static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) | |||
1160 | debugf0(" Address range split per DCT: %s\n", | 1160 | debugf0(" Address range split per DCT: %s\n", |
1161 | (dct_high_range_enabled(pvt) ? "yes" : "no")); | 1161 | (dct_high_range_enabled(pvt) ? "yes" : "no")); |
1162 | 1162 | ||
1163 | debugf0(" DCT data interleave for ECC: %s, " | 1163 | debugf0(" data interleave for ECC: %s, " |
1164 | "DRAM cleared since last warm reset: %s\n", | 1164 | "DRAM cleared since last warm reset: %s\n", |
1165 | (dct_data_intlv_enabled(pvt) ? "enabled" : "disabled"), | 1165 | (dct_data_intlv_enabled(pvt) ? "enabled" : "disabled"), |
1166 | (dct_memory_cleared(pvt) ? "yes" : "no")); | 1166 | (dct_memory_cleared(pvt) ? "yes" : "no")); |
1167 | 1167 | ||
1168 | debugf0(" DCT channel interleave: %s, " | 1168 | debugf0(" channel interleave: %s, " |
1169 | "DCT interleave bits selector: 0x%x\n", | 1169 | "interleave bits selector: 0x%x\n", |
1170 | (dct_interleave_enabled(pvt) ? "enabled" : "disabled"), | 1170 | (dct_interleave_enabled(pvt) ? "enabled" : "disabled"), |
1171 | dct_sel_interleave_addr(pvt)); | 1171 | dct_sel_interleave_addr(pvt)); |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | amd64_read_dct_pci_cfg(pvt, F10_DCTL_SEL_HIGH, &pvt->dct_sel_hi); | 1174 | amd64_read_dct_pci_cfg(pvt, DCT_SEL_HI, &pvt->dct_sel_hi); |
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | /* | 1177 | /* |
@@ -1181,7 +1181,7 @@ static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) | |||
1181 | static u8 f10_determine_channel(struct amd64_pvt *pvt, u64 sys_addr, | 1181 | static u8 f10_determine_channel(struct amd64_pvt *pvt, u64 sys_addr, |
1182 | bool hi_range_sel, u8 intlv_en) | 1182 | bool hi_range_sel, u8 intlv_en) |
1183 | { | 1183 | { |
1184 | u32 dct_sel_high = (pvt->dct_sel_low >> 1) & 1; | 1184 | u32 dct_sel_high = (pvt->dct_sel_lo >> 1) & 1; |
1185 | 1185 | ||
1186 | if (dct_ganging_enabled(pvt)) | 1186 | if (dct_ganging_enabled(pvt)) |
1187 | return 0; | 1187 | return 0; |
@@ -1955,7 +1955,7 @@ static void read_mc_regs(struct amd64_pvt *pvt) | |||
1955 | amd64_read_dct_pci_cfg(pvt, DCLR0, &pvt->dclr0); | 1955 | amd64_read_dct_pci_cfg(pvt, DCLR0, &pvt->dclr0); |
1956 | amd64_read_dct_pci_cfg(pvt, DCHR0, &pvt->dchr0); | 1956 | amd64_read_dct_pci_cfg(pvt, DCHR0, &pvt->dchr0); |
1957 | 1957 | ||
1958 | if (!dct_ganging_enabled(pvt) && boot_cpu_data.x86 > 0xf) { | 1958 | if (!dct_ganging_enabled(pvt)) { |
1959 | amd64_read_dct_pci_cfg(pvt, DCLR1, &pvt->dclr1); | 1959 | amd64_read_dct_pci_cfg(pvt, DCLR1, &pvt->dclr1); |
1960 | amd64_read_dct_pci_cfg(pvt, DCHR1, &pvt->dchr1); | 1960 | amd64_read_dct_pci_cfg(pvt, DCHR1, &pvt->dchr1); |
1961 | } | 1961 | } |
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h index 7323f1b493ad..0244c612b3f2 100644 --- a/drivers/edac/amd64_edac.h +++ b/drivers/edac/amd64_edac.h | |||
@@ -227,19 +227,19 @@ | |||
227 | #define DCHR1 0x194 | 227 | #define DCHR1 0x194 |
228 | #define DDR3_MODE BIT(8) | 228 | #define DDR3_MODE BIT(8) |
229 | 229 | ||
230 | #define F10_DCTL_SEL_LOW 0x110 | 230 | #define DCT_SEL_LO 0x110 |
231 | #define dct_sel_baseaddr(pvt) ((pvt->dct_sel_low) & 0xFFFFF800) | 231 | #define dct_sel_baseaddr(pvt) ((pvt)->dct_sel_lo & 0xFFFFF800) |
232 | #define dct_sel_interleave_addr(pvt) (((pvt->dct_sel_low) >> 6) & 0x3) | 232 | #define dct_sel_interleave_addr(pvt) (((pvt)->dct_sel_lo >> 6) & 0x3) |
233 | #define dct_high_range_enabled(pvt) (pvt->dct_sel_low & BIT(0)) | 233 | #define dct_high_range_enabled(pvt) ((pvt)->dct_sel_lo & BIT(0)) |
234 | #define dct_interleave_enabled(pvt) (pvt->dct_sel_low & BIT(2)) | 234 | #define dct_interleave_enabled(pvt) ((pvt)->dct_sel_lo & BIT(2)) |
235 | 235 | ||
236 | #define dct_ganging_enabled(pvt) ((boot_cpu_data.x86 == 0x10) && ((pvt)->dct_sel_low & BIT(4))) | 236 | #define dct_ganging_enabled(pvt) ((boot_cpu_data.x86 == 0x10) && ((pvt)->dct_sel_lo & BIT(4))) |
237 | 237 | ||
238 | #define dct_data_intlv_enabled(pvt) (pvt->dct_sel_low & BIT(5)) | 238 | #define dct_data_intlv_enabled(pvt) ((pvt)->dct_sel_lo & BIT(5)) |
239 | #define dct_dram_enabled(pvt) (pvt->dct_sel_low & BIT(8)) | 239 | #define dct_dram_enabled(pvt) ((pvt)->dct_sel_lo & BIT(8)) |
240 | #define dct_memory_cleared(pvt) (pvt->dct_sel_low & BIT(10)) | 240 | #define dct_memory_cleared(pvt) ((pvt)->dct_sel_lo & BIT(10)) |
241 | 241 | ||
242 | #define F10_DCTL_SEL_HIGH 0x114 | 242 | #define DCT_SEL_HI 0x114 |
243 | 243 | ||
244 | /* | 244 | /* |
245 | * Function 3 - Misc Control | 245 | * Function 3 - Misc Control |
@@ -419,8 +419,8 @@ struct amd64_pvt { | |||
419 | u64 top_mem; /* top of memory below 4GB */ | 419 | u64 top_mem; /* top of memory below 4GB */ |
420 | u64 top_mem2; /* top of memory above 4GB */ | 420 | u64 top_mem2; /* top of memory above 4GB */ |
421 | 421 | ||
422 | u32 dct_sel_low; /* DRAM Controller Select Low Reg */ | 422 | u32 dct_sel_lo; /* DRAM Controller Select Low */ |
423 | u32 dct_sel_hi; /* DRAM Controller Select High Reg */ | 423 | u32 dct_sel_hi; /* DRAM Controller Select High */ |
424 | u32 online_spare; /* On-Line spare Reg */ | 424 | u32 online_spare; /* On-Line spare Reg */ |
425 | 425 | ||
426 | /* x4 or x8 syndromes in use */ | 426 | /* x4 or x8 syndromes in use */ |