aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/cpufreq-pxa2xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/cpufreq-pxa2xx.c')
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa2xx.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
index 9e4d9816726a..268a9bc6be8a 100644
--- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c
+++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
@@ -256,13 +256,9 @@ static void init_sdram_rows(void)
256 256
257static u32 mdrefr_dri(unsigned int freq) 257static u32 mdrefr_dri(unsigned int freq)
258{ 258{
259 u32 dri = 0; 259 u32 interval = freq * SDRAM_TREF / sdram_rows;
260 260
261 if (cpu_is_pxa25x()) 261 return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32;
262 dri = ((freq * SDRAM_TREF) / (sdram_rows * 32));
263 if (cpu_is_pxa27x())
264 dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32;
265 return dri;
266} 262}
267 263
268/* find a valid frequency point */ 264/* find a valid frequency point */