diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-01-17 11:52:57 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-03-17 09:46:23 -0400 |
commit | 5a5d237169152d4d7e4b6105eab15831829fb8e7 (patch) | |
tree | 2cfd8c926c05a70d302d792d9687ab55788c05e7 /drivers/edac/amd64_edac.c | |
parent | b15f0fcab1ab85c773c9fa235c76e6ce90b7462e (diff) |
amd64_edac: Sanitize ->read_dram_ctl_register
This function is relevant for F10h and higher, and it has only one
callsite so drop its function pointer from the low_ops struct.
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 1cd82f9efb77..b85487d4de8d 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -1138,16 +1138,18 @@ static int f10_dbam_to_chip_select(struct amd64_pvt *pvt, int cs_mode) | |||
1138 | return dbam_map[cs_mode]; | 1138 | return dbam_map[cs_mode]; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | static void f10_read_dram_ctl_register(struct amd64_pvt *pvt) | 1141 | static void read_dram_ctl_register(struct amd64_pvt *pvt) |
1142 | { | 1142 | { |
1143 | 1143 | ||
1144 | if (boot_cpu_data.x86 == 0xf) | ||
1145 | return; | ||
1146 | |||
1144 | if (!amd64_read_dct_pci_cfg(pvt, DCT_SEL_LO, &pvt->dct_sel_lo)) { | 1147 | if (!amd64_read_dct_pci_cfg(pvt, DCT_SEL_LO, &pvt->dct_sel_lo)) { |
1145 | debugf0("F2x110 (DCTSelLow): 0x%08x, High range addrs at: 0x%x\n", | 1148 | debugf0("F2x110 (DCTSelLow): 0x%08x, High range addrs at: 0x%x\n", |
1146 | pvt->dct_sel_lo, dct_sel_baseaddr(pvt)); | 1149 | pvt->dct_sel_lo, dct_sel_baseaddr(pvt)); |
1147 | 1150 | ||
1148 | debugf0(" mode: %s, All DCTs on: %s\n", | 1151 | debugf0(" DCTs operate in %s mode.\n", |
1149 | (dct_ganging_enabled(pvt) ? "ganged" : "unganged"), | 1152 | (dct_ganging_enabled(pvt) ? "ganged" : "unganged")); |
1150 | (dct_dram_enabled(pvt) ? "yes" : "no")); | ||
1151 | 1153 | ||
1152 | if (!dct_ganging_enabled(pvt)) | 1154 | if (!dct_ganging_enabled(pvt)) |
1153 | debugf0(" Address range split per DCT: %s\n", | 1155 | debugf0(" Address range split per DCT: %s\n", |
@@ -1579,7 +1581,6 @@ static struct amd64_family_type amd64_family_types[] = { | |||
1579 | .f3_id = PCI_DEVICE_ID_AMD_10H_NB_MISC, | 1581 | .f3_id = PCI_DEVICE_ID_AMD_10H_NB_MISC, |
1580 | .ops = { | 1582 | .ops = { |
1581 | .early_channel_count = f1x_early_channel_count, | 1583 | .early_channel_count = f1x_early_channel_count, |
1582 | .read_dram_ctl_register = f10_read_dram_ctl_register, | ||
1583 | .map_sysaddr_to_csrow = f1x_map_sysaddr_to_csrow, | 1584 | .map_sysaddr_to_csrow = f1x_map_sysaddr_to_csrow, |
1584 | .dbam_to_cs = f10_dbam_to_chip_select, | 1585 | .dbam_to_cs = f10_dbam_to_chip_select, |
1585 | .read_dct_pci_cfg = f10_read_dct_pci_cfg, | 1586 | .read_dct_pci_cfg = f10_read_dct_pci_cfg, |
@@ -1939,8 +1940,7 @@ static void read_mc_regs(struct amd64_pvt *pvt) | |||
1939 | 1940 | ||
1940 | amd64_read_pci_cfg(pvt->F3, NBCAP, &pvt->nbcap); | 1941 | amd64_read_pci_cfg(pvt->F3, NBCAP, &pvt->nbcap); |
1941 | 1942 | ||
1942 | if (pvt->ops->read_dram_ctl_register) | 1943 | read_dram_ctl_register(pvt); |
1943 | pvt->ops->read_dram_ctl_register(pvt); | ||
1944 | 1944 | ||
1945 | for (range = 0; range < DRAM_RANGES; range++) { | 1945 | for (range = 0; range < DRAM_RANGES; range++) { |
1946 | u8 rw; | 1946 | u8 rw; |