diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2010-11-24 19:52:09 +0100 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-01-07 11:38:31 +0100 |
commit | 390944439f746824faec51b576f50cb5ef18745b (patch) | |
tree | 5fd15e75e8e5e5d3dc1e176c655829f9d0f83aa9 /drivers/edac/cpc925_edac.c | |
parent | 360b7f3c602ed80ce8c6b2585dcb76883a440c17 (diff) | |
download | linux-rpi-390944439f746824faec51b576f50cb5ef18745b.tar.gz linux-rpi-390944439f746824faec51b576f50cb5ef18745b.tar.bz2 linux-rpi-390944439f746824faec51b576f50cb5ef18745b.zip |
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/cpc925_edac.c')
-rw-r--r-- | drivers/edac/cpc925_edac.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/edac/cpc925_edac.c b/drivers/edac/cpc925_edac.c index 1609a19df495..b9a781c47e3c 100644 --- a/drivers/edac/cpc925_edac.c +++ b/drivers/edac/cpc925_edac.c @@ -818,9 +818,10 @@ static void cpc925_del_edac_devices(void) } /* Convert current back-ground scrub rate into byte/sec bandwith */ -static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw) +static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci) { struct cpc925_mc_pdata *pdata = mci->pvt_info; + int bw; u32 mscr; u8 si; @@ -832,11 +833,11 @@ static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw) if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) || (si == 0)) { cpc925_mc_printk(mci, KERN_INFO, "Scrub mode not enabled\n"); - *bw = 0; + bw = 0; } else - *bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si; + bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si; - return 0; + return bw; } /* Return 0 for single channel; 1 for dual channel */ |