aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.c
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2010-10-14 08:37:13 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2011-01-07 05:33:59 -0500
commitf1db274e1ba7004909de4a9cee62f631c030ba3e (patch)
tree81c74f068eb1e428025053e30c05be264762a0b6 /drivers/edac/amd64_edac.c
parent027dbd6f5d419c25750d6a26c5c46f46f2093a11 (diff)
amd64_edac: Remove PCI ECS enabling functions
PCI ECS is being enabled by default since 2.6.26 on AMD so this code is just superfluous now, remove it. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r--drivers/edac/amd64_edac.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 98c0150800dc..9efa88a9fdf5 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1204,31 +1204,6 @@ static int f10_dbam_to_chip_select(struct amd64_pvt *pvt, int cs_mode)
1204 return dbam_map[cs_mode]; 1204 return dbam_map[cs_mode];
1205} 1205}
1206 1206
1207/* Enable extended configuration access via 0xCF8 feature */
1208static void amd64_setup(struct amd64_pvt *pvt)
1209{
1210 u32 reg;
1211
1212 amd64_read_pci_cfg(pvt->F3, F10_NB_CFG_HIGH, &reg);
1213
1214 pvt->flags.cf8_extcfg = !!(reg & F10_NB_CFG_LOW_ENABLE_EXT_CFG);
1215 reg |= F10_NB_CFG_LOW_ENABLE_EXT_CFG;
1216 pci_write_config_dword(pvt->F3, F10_NB_CFG_HIGH, reg);
1217}
1218
1219/* Restore the extended configuration access via 0xCF8 feature */
1220static void amd64_teardown(struct amd64_pvt *pvt)
1221{
1222 u32 reg;
1223
1224 amd64_read_pci_cfg(pvt->F3, F10_NB_CFG_HIGH, &reg);
1225
1226 reg &= ~F10_NB_CFG_LOW_ENABLE_EXT_CFG;
1227 if (pvt->flags.cf8_extcfg)
1228 reg |= F10_NB_CFG_LOW_ENABLE_EXT_CFG;
1229 pci_write_config_dword(pvt->F3, F10_NB_CFG_HIGH, reg);
1230}
1231
1232static u64 f10_get_error_address(struct mem_ctl_info *mci, 1207static u64 f10_get_error_address(struct mem_ctl_info *mci,
1233 struct err_regs *info) 1208 struct err_regs *info)
1234{ 1209{
@@ -1251,8 +1226,6 @@ static void f10_read_dram_base_limit(struct amd64_pvt *pvt, int dram)
1251 1226
1252 /* read the 'raw' DRAM BASE Address register */ 1227 /* read the 'raw' DRAM BASE Address register */
1253 amd64_read_pci_cfg(pvt->F1, low_offset, &low_base); 1228 amd64_read_pci_cfg(pvt->F1, low_offset, &low_base);
1254
1255 /* Read from the ECS data register */
1256 amd64_read_pci_cfg(pvt->F1, high_offset, &high_base); 1229 amd64_read_pci_cfg(pvt->F1, high_offset, &high_base);
1257 1230
1258 /* Extract parts into separate data entries */ 1231 /* Extract parts into separate data entries */
@@ -1271,8 +1244,6 @@ static void f10_read_dram_base_limit(struct amd64_pvt *pvt, int dram)
1271 1244
1272 /* read the 'raw' LIMIT registers */ 1245 /* read the 'raw' LIMIT registers */
1273 amd64_read_pci_cfg(pvt->F1, low_offset, &low_limit); 1246 amd64_read_pci_cfg(pvt->F1, low_offset, &low_limit);
1274
1275 /* Read from the ECS data register for the HIGH portion */
1276 amd64_read_pci_cfg(pvt->F1, high_offset, &high_limit); 1247 amd64_read_pci_cfg(pvt->F1, high_offset, &high_limit);
1277 1248
1278 pvt->dram_DstNode[dram] = (low_limit & 0x7); 1249 pvt->dram_DstNode[dram] = (low_limit & 0x7);
@@ -2560,18 +2531,6 @@ static struct amd64_family_type *amd64_per_family_init(struct amd64_pvt *pvt)
2560 return fam_type; 2531 return fam_type;
2561} 2532}
2562 2533
2563/*
2564 * Init stuff for this DRAM Controller device.
2565 *
2566 * Due to a hardware feature on Fam10h CPUs, the Enable Extended Configuration
2567 * Space feature MUST be enabled on ALL Processors prior to actually reading
2568 * from the ECS registers. Since the loading of the module can occur on any
2569 * 'core', and cores don't 'see' all the other processors ECS data when the
2570 * others are NOT enabled. Our solution is to first enable ECS access in this
2571 * routine on all processors, gather some data in a amd64_pvt structure and
2572 * later come back in a finish-setup function to perform that final
2573 * initialization. See also amd64_init_2nd_stage() for that.
2574 */
2575static int amd64_probe_one_instance(struct pci_dev *F2) 2534static int amd64_probe_one_instance(struct pci_dev *F2)
2576{ 2535{
2577 struct amd64_pvt *pvt = NULL; 2536 struct amd64_pvt *pvt = NULL;
@@ -2603,14 +2562,6 @@ static int amd64_probe_one_instance(struct pci_dev *F2)
2603 goto err_put; 2562 goto err_put;
2604 2563
2605 /* 2564 /*
2606 * Key operation here: setup of HW prior to performing ops on it. Some
2607 * setup is required to access ECS data. After this is performed, the
2608 * 'teardown' function must be called upon error and normal exit paths.
2609 */
2610 if (boot_cpu_data.x86 >= 0x10)
2611 amd64_setup(pvt);
2612
2613 /*
2614 * Save the pointer to the private data for use in 2nd initialization 2565 * Save the pointer to the private data for use in 2nd initialization
2615 * stage 2566 * stage
2616 */ 2567 */
@@ -2690,9 +2641,6 @@ err_exit:
2690 2641
2691 amd64_restore_ecc_error_reporting(pvt); 2642 amd64_restore_ecc_error_reporting(pvt);
2692 2643
2693 if (boot_cpu_data.x86 > 0xf)
2694 amd64_teardown(pvt);
2695
2696 amd64_free_mc_sibling_devices(pvt); 2644 amd64_free_mc_sibling_devices(pvt);
2697 2645
2698 kfree(pvts[pvt->mc_node_id]); 2646 kfree(pvts[pvt->mc_node_id]);
@@ -2734,9 +2682,6 @@ static void __devexit amd64_remove_one_instance(struct pci_dev *pdev)
2734 2682
2735 amd64_restore_ecc_error_reporting(pvt); 2683 amd64_restore_ecc_error_reporting(pvt);
2736 2684
2737 if (boot_cpu_data.x86 > 0xf)
2738 amd64_teardown(pvt);
2739
2740 amd64_free_mc_sibling_devices(pvt); 2685 amd64_free_mc_sibling_devices(pvt);
2741 2686
2742 /* unregister from EDAC MCE */ 2687 /* unregister from EDAC MCE */