aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/cpc925_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/cpc925_edac.c')
-rw-r--r--drivers/edac/cpc925_edac.c9
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)
818} 818}
819 819
820/* Convert current back-ground scrub rate into byte/sec bandwith */ 820/* Convert current back-ground scrub rate into byte/sec bandwith */
821static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw) 821static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci)
822{ 822{
823 struct cpc925_mc_pdata *pdata = mci->pvt_info; 823 struct cpc925_mc_pdata *pdata = mci->pvt_info;
824 int bw;
824 u32 mscr; 825 u32 mscr;
825 u8 si; 826 u8 si;
826 827
@@ -832,11 +833,11 @@ static int cpc925_get_sdram_scrub_rate(struct mem_ctl_info *mci, u32 *bw)
832 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) || 833 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) ||
833 (si == 0)) { 834 (si == 0)) {
834 cpc925_mc_printk(mci, KERN_INFO, "Scrub mode not enabled\n"); 835 cpc925_mc_printk(mci, KERN_INFO, "Scrub mode not enabled\n");
835 *bw = 0; 836 bw = 0;
836 } else 837 } else
837 *bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si; 838 bw = CPC925_SCRUB_BLOCK_SIZE * 0xFA67 / si;
838 839
839 return 0; 840 return bw;
840} 841}
841 842
842/* Return 0 for single channel; 1 for dual channel */ 843/* Return 0 for single channel; 1 for dual channel */