diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-12-22 19:48:20 +0100 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 14:46:15 +0100 |
commit | c9f4f26eae096c39547139666e8af607c2447f94 (patch) | |
tree | 754fabb84aea79bac1d8a05e3017d4df52ac817b /drivers/edac/amd64_edac.c | |
parent | amd64_edac: Cleanup DCT Select Low/High code (diff) | |
download | linux-c9f4f26eae096c39547139666e8af607c2447f94.tar.xz linux-c9f4f26eae096c39547139666e8af607c2447f94.zip |
amd64_edac: Cleanup NBCTL code
Remove family names from macro names, drop single bit defines and
comment their meaning instead.
No functional change.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r-- | drivers/edac/amd64_edac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 495b4d506671..9a8a31317071 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -2196,21 +2196,20 @@ static bool enable_ecc_error_reporting(struct ecc_settings *s, u8 nid, struct pci_dev *F3) { bool ret = true; - u32 value, mask = K8_NBCTL_CECCEn | K8_NBCTL_UECCEn; + u32 value, mask = 0x3; /* UECC/CECC enable */ if (toggle_ecc_err_reporting(s, nid, ON)) { amd64_warn("Error enabling ECC reporting over MCGCTL!\n"); return false; } - amd64_read_pci_cfg(F3, K8_NBCTL, &value); + amd64_read_pci_cfg(F3, NBCTL, &value); - /* turn on UECCEn and CECCEn bits */ s->old_nbctl = value & mask; s->nbctl_valid = true; value |= mask; - amd64_write_pci_cfg(F3, K8_NBCTL, value); + amd64_write_pci_cfg(F3, NBCTL, value); amd64_read_pci_cfg(F3, K8_NBCFG, &value); @@ -2250,16 +2249,17 @@ static bool enable_ecc_error_reporting(struct ecc_settings *s, u8 nid, static void restore_ecc_error_reporting(struct ecc_settings *s, u8 nid, struct pci_dev *F3) { - u32 value, mask = K8_NBCTL_CECCEn | K8_NBCTL_UECCEn; + u32 value, mask = 0x3; /* UECC/CECC enable */ + if (!s->nbctl_valid) return; - amd64_read_pci_cfg(F3, K8_NBCTL, &value); + amd64_read_pci_cfg(F3, NBCTL, &value); value &= ~mask; value |= s->old_nbctl; - amd64_write_pci_cfg(F3, K8_NBCTL, value); + amd64_write_pci_cfg(F3, NBCTL, value); /* restore previous BIOS DRAM ECC "off" setting we force-enabled */ if (!s->flags.nb_ecc_prev) { |