aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e7xxx_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 04:38:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:07 -0500
commit749ede57443b2a7ede2db105145f21047efcea6a (patch)
tree0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/e7xxx_edac.c
parentd38fde84f7521973fdfa5c3d03d62f014b42cd03 (diff)
[PATCH] EDAC: cleanup code for clearing initial errors
Fix xxx_probe1() functions so they call xxx_get_error_info() functions to clear initial errors. This is simpler and cleaner than duplicating the low-level code for accessing PCI config space. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r--drivers/edac/e7xxx_edac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index ec6eb77edaed..8b0da35ae47c 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -357,7 +357,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
357 int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */ 357 int drc_ddim; /* DRAM Data Integrity Mode 0=none,2=edac */
358 u32 dra; 358 u32 dra;
359 unsigned long last_cumul_size; 359 unsigned long last_cumul_size;
360 360 struct e7xxx_error_info discard;
361 361
362 debugf0("%s(): mci\n", __func__); 362 debugf0("%s(): mci\n", __func__);
363 363
@@ -470,8 +470,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
470 pvt->tolm, pvt->remapbase, pvt->remaplimit); 470 pvt->tolm, pvt->remapbase, pvt->remaplimit);
471 471
472 /* clear any pending errors, or initial state bits */ 472 /* clear any pending errors, or initial state bits */
473 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_FERR, 0x03, 0x03); 473 e7xxx_get_error_info(mci, &discard);
474 pci_write_bits8(pvt->bridge_ck, E7XXX_DRAM_NERR, 0x03, 0x03);
475 474
476 if (edac_mc_add_mc(mci) != 0) { 475 if (edac_mc_add_mc(mci) != 0) {
477 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 476 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);