aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e752x_edac.c
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2010-11-24 13:52:09 -0500
committerBorislav Petkov <borislav.petkov@amd.com>2011-01-07 05:38:31 -0500
commit390944439f746824faec51b576f50cb5ef18745b (patch)
tree5fd15e75e8e5e5d3dc1e176c655829f9d0f83aa9 /drivers/edac/e752x_edac.c
parent360b7f3c602ed80ce8c6b2585dcb76883a440c17 (diff)
EDAC: Fixup scrubrate manipulation
Make the ->{get|set}_sdram_scrub_rate return the actual scrub rate bandwidth it succeeded setting and remove superfluous arg pointer used for that. A negative value returned still means that an error occurred while setting the scrubrate. Document this for future reference. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/e752x_edac.c')
-rw-r--r--drivers/edac/e752x_edac.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 073f5a06d238..ec302d426589 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -983,11 +983,11 @@ static int set_sdram_scrub_rate(struct mem_ctl_info *mci, u32 new_bw)
983 983
984 pci_write_config_word(pdev, E752X_MCHSCRB, scrubrates[i].scrubval); 984 pci_write_config_word(pdev, E752X_MCHSCRB, scrubrates[i].scrubval);
985 985
986 return 0; 986 return scrubrates[i].bandwidth;
987} 987}
988 988
989/* Convert current scrub rate value into byte/sec bandwidth */ 989/* Convert current scrub rate value into byte/sec bandwidth */
990static int get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw) 990static int get_sdram_scrub_rate(struct mem_ctl_info *mci)
991{ 991{
992 const struct scrubrate *scrubrates; 992 const struct scrubrate *scrubrates;
993 struct e752x_pvt *pvt = (struct e752x_pvt *) mci->pvt_info; 993 struct e752x_pvt *pvt = (struct e752x_pvt *) mci->pvt_info;
@@ -1013,10 +1013,8 @@ static int get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw)
1013 "Invalid sdram scrub control value: 0x%x\n", scrubval); 1013 "Invalid sdram scrub control value: 0x%x\n", scrubval);
1014 return -1; 1014 return -1;
1015 } 1015 }
1016 return scrubrates[i].bandwidth;
1016 1017
1017 *bw = scrubrates[i].bandwidth;
1018
1019 return 0;
1020} 1018}
1021 1019
1022/* Return 1 if dual channel mode is active. Else return 0. */ 1020/* Return 1 if dual channel mode is active. Else return 0. */