diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-27 08:04:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-30 13:56:51 -0400 |
commit | bb81a21637f84e2192bf327575645a7843c70cdb (patch) | |
tree | f1093fc9a806b6a5ab0c058fb64849f397697afd /drivers/edac/i7300_edac.c | |
parent | d7de2bdb0e15c594aefbc71d899c4684a5ce6559 (diff) |
i7300_edac: Detect if the device is on single mode
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7300_edac.c')
-rw-r--r-- | drivers/edac/i7300_edac.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c index 27088af79672..a88742abf1f4 100644 --- a/drivers/edac/i7300_edac.c +++ b/drivers/edac/i7300_edac.c | |||
@@ -92,12 +92,13 @@ | |||
92 | 92 | ||
93 | /* OFFSETS for Function 1 */ | 93 | /* OFFSETS for Function 1 */ |
94 | #define MC_SETTINGS 0x40 | 94 | #define MC_SETTINGS 0x40 |
95 | #define IS_MIRRORED(mc) ((mc) & (1 << 16)) | ||
96 | #define IS_ECC_ENABLED(mc) ((mc) & (1 << 5)) | ||
97 | #define IS_RETRY_ENABLED(mc) ((mc) & (1 << 31)) | ||
98 | #define IS_SCRBALGO_ENHANCED(mc) ((mc) & (1 << 8)) | ||
95 | 99 | ||
96 | #define IS_MIRRORED(mc) ((mc) & (1 << 16)) | 100 | #define MC_SETTINGS_A 0x58 |
97 | #define IS_ECC_ENABLED(mc) ((mc) & (1 << 5)) | 101 | #define IS_SINGLE_MODE(mca) ((mca) & (1 << 14)) |
98 | #define IS_RETRY_ENABLED(mc) ((mc) & (1 << 31)) | ||
99 | #define IS_SCRBALGO_ENHANCED(mc) ((mc) & (1 << 8)) | ||
100 | |||
101 | 102 | ||
102 | #define TOLM 0x6C | 103 | #define TOLM 0x6C |
103 | #define REDMEMB 0x7C | 104 | #define REDMEMB 0x7C |
@@ -237,9 +238,11 @@ struct i7300_pvt { | |||
237 | 238 | ||
238 | u16 tolm; /* top of low memory */ | 239 | u16 tolm; /* top of low memory */ |
239 | u64 ambase; /* AMB BAR */ | 240 | u64 ambase; /* AMB BAR */ |
240 | u32 mc_settings; | ||
241 | 241 | ||
242 | u16 mir[MAX_MIR]; | 242 | u32 mc_settings; /* Report several settings */ |
243 | u32 mc_settings_a; | ||
244 | |||
245 | u16 mir[MAX_MIR]; /* Memory Interleave Reg*/ | ||
243 | 246 | ||
244 | u16 mtr[MAX_SLOTS][MAX_BRANCHES]; /* Memory Technlogy Reg */ | 247 | u16 mtr[MAX_SLOTS][MAX_BRANCHES]; /* Memory Technlogy Reg */ |
245 | u16 ambpresent[MAX_CHANNELS]; /* AMB present regs */ | 248 | u16 ambpresent[MAX_CHANNELS]; /* AMB present regs */ |
@@ -653,9 +656,15 @@ static int i7300_get_mc_regs(struct mem_ctl_info *mci) | |||
653 | /* Get memory controller settings */ | 656 | /* Get memory controller settings */ |
654 | pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map, MC_SETTINGS, | 657 | pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map, MC_SETTINGS, |
655 | &pvt->mc_settings); | 658 | &pvt->mc_settings); |
659 | pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map, MC_SETTINGS_A, | ||
660 | &pvt->mc_settings_a); | ||
656 | 661 | ||
657 | debugf0("Memory controller operating on %s mode\n", | 662 | if (IS_SINGLE_MODE(pvt->mc_settings_a)) |
663 | debugf0("Memory controller operating on single mode\n"); | ||
664 | else | ||
665 | debugf0("Memory controller operating on %s mode\n", | ||
658 | IS_MIRRORED(pvt->mc_settings) ? "mirrored" : "non-mirrored"); | 666 | IS_MIRRORED(pvt->mc_settings) ? "mirrored" : "non-mirrored"); |
667 | |||
659 | debugf0("Error detection is %s\n", | 668 | debugf0("Error detection is %s\n", |
660 | IS_ECC_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); | 669 | IS_ECC_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); |
661 | debugf0("Retry is %s\n", | 670 | debugf0("Retry is %s\n", |