diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-01-07 11:58:04 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 09:46:19 -0400 |
commit | 7d20d14da1bf24199add02cf4293871c277a4bda (patch) | |
tree | b24bdf17282eb9a9ac2b3708cff50e0d72296517 /drivers/edac | |
parent | 5980bb9cd88a3fa44cc5beab599f08fbc928b832 (diff) |
amd64_edac: Adjust channel counting to F15h
The only difference is that F10h used to sport ganged DCTs and F15h
doesn't so adjust the F10h routine and reuse it.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/amd64_edac.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 729d9f1aecb9..1ec014534e18 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -1082,15 +1082,13 @@ static int k8_dbam_to_chip_select(struct amd64_pvt *pvt, int cs_mode) | |||
1082 | * Pass back: | 1082 | * Pass back: |
1083 | * contents of the DCL0_LOW register | 1083 | * contents of the DCL0_LOW register |
1084 | */ | 1084 | */ |
1085 | static int f10_early_channel_count(struct amd64_pvt *pvt) | 1085 | static int f1x_early_channel_count(struct amd64_pvt *pvt) |
1086 | { | 1086 | { |
1087 | int i, j, channels = 0; | 1087 | int i, j, channels = 0; |
1088 | 1088 | ||
1089 | /* If we are in 128 bit mode, then we are using 2 channels */ | 1089 | /* On F10h, if we are in 128 bit mode, then we are using 2 channels */ |
1090 | if (pvt->dclr0 & F10_WIDTH_128) { | 1090 | if (boot_cpu_data.x86 == 0x10 && (pvt->dclr0 & F10_WIDTH_128)) |
1091 | channels = 2; | 1091 | return 2; |
1092 | return channels; | ||
1093 | } | ||
1094 | 1092 | ||
1095 | /* | 1093 | /* |
1096 | * Need to check if in unganged mode: In such, there are 2 channels, | 1094 | * Need to check if in unganged mode: In such, there are 2 channels, |
@@ -1540,7 +1538,7 @@ static struct amd64_family_type amd64_family_types[] = { | |||
1540 | .f1_id = PCI_DEVICE_ID_AMD_10H_NB_MAP, | 1538 | .f1_id = PCI_DEVICE_ID_AMD_10H_NB_MAP, |
1541 | .f3_id = PCI_DEVICE_ID_AMD_10H_NB_MISC, | 1539 | .f3_id = PCI_DEVICE_ID_AMD_10H_NB_MISC, |
1542 | .ops = { | 1540 | .ops = { |
1543 | .early_channel_count = f10_early_channel_count, | 1541 | .early_channel_count = f1x_early_channel_count, |
1544 | .get_error_address = f10_get_error_address, | 1542 | .get_error_address = f10_get_error_address, |
1545 | .read_dram_ctl_register = f10_read_dram_ctl_register, | 1543 | .read_dram_ctl_register = f10_read_dram_ctl_register, |
1546 | .map_sysaddr_to_csrow = f10_map_sysaddr_to_csrow, | 1544 | .map_sysaddr_to_csrow = f10_map_sysaddr_to_csrow, |
@@ -1551,6 +1549,7 @@ static struct amd64_family_type amd64_family_types[] = { | |||
1551 | [F15_CPUS] = { | 1549 | [F15_CPUS] = { |
1552 | .ctl_name = "F15h", | 1550 | .ctl_name = "F15h", |
1553 | .ops = { | 1551 | .ops = { |
1552 | .early_channel_count = f1x_early_channel_count, | ||
1554 | .read_dct_pci_cfg = f15_read_dct_pci_cfg, | 1553 | .read_dct_pci_cfg = f15_read_dct_pci_cfg, |
1555 | } | 1554 | } |
1556 | }, | 1555 | }, |