diff options
Diffstat (limited to 'arch/arm/mach-pxa/cpufreq-pxa2xx.c')
-rw-r--r-- | arch/arm/mach-pxa/cpufreq-pxa2xx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c index 58093d9e07be..6a7aeab42f6c 100644 --- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c +++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c | |||
@@ -38,8 +38,10 @@ | |||
38 | #include <linux/cpufreq.h> | 38 | #include <linux/cpufreq.h> |
39 | #include <linux/err.h> | 39 | #include <linux/err.h> |
40 | #include <linux/regulator/consumer.h> | 40 | #include <linux/regulator/consumer.h> |
41 | #include <linux/io.h> | ||
41 | 42 | ||
42 | #include <mach/pxa2xx-regs.h> | 43 | #include <mach/pxa2xx-regs.h> |
44 | #include <mach/smemc.h> | ||
43 | 45 | ||
44 | #ifdef DEBUG | 46 | #ifdef DEBUG |
45 | static unsigned int freq_debug; | 47 | static unsigned int freq_debug; |
@@ -242,7 +244,7 @@ static void pxa27x_guess_max_freq(void) | |||
242 | 244 | ||
243 | static void init_sdram_rows(void) | 245 | static void init_sdram_rows(void) |
244 | { | 246 | { |
245 | uint32_t mdcnfg = MDCNFG; | 247 | uint32_t mdcnfg = __raw_readl(MDCNFG); |
246 | unsigned int drac2 = 0, drac0 = 0; | 248 | unsigned int drac2 = 0, drac0 = 0; |
247 | 249 | ||
248 | if (mdcnfg & (MDCNFG_DE2 | MDCNFG_DE3)) | 250 | if (mdcnfg & (MDCNFG_DE2 | MDCNFG_DE3)) |
@@ -331,8 +333,8 @@ static int pxa_set_target(struct cpufreq_policy *policy, | |||
331 | * we need to preset the smaller DRI before the change. If we're | 333 | * we need to preset the smaller DRI before the change. If we're |
332 | * speeding up we need to set the larger DRI value after the change. | 334 | * speeding up we need to set the larger DRI value after the change. |
333 | */ | 335 | */ |
334 | preset_mdrefr = postset_mdrefr = MDREFR; | 336 | preset_mdrefr = postset_mdrefr = __raw_readl(MDREFR); |
335 | if ((MDREFR & MDREFR_DRI_MASK) > mdrefr_dri(new_freq_mem)) { | 337 | if ((preset_mdrefr & MDREFR_DRI_MASK) > mdrefr_dri(new_freq_mem)) { |
336 | preset_mdrefr = (preset_mdrefr & ~MDREFR_DRI_MASK); | 338 | preset_mdrefr = (preset_mdrefr & ~MDREFR_DRI_MASK); |
337 | preset_mdrefr |= mdrefr_dri(new_freq_mem); | 339 | preset_mdrefr |= mdrefr_dri(new_freq_mem); |
338 | } | 340 | } |
@@ -370,7 +372,7 @@ static int pxa_set_target(struct cpufreq_policy *policy, | |||
370 | 3: nop \n\ | 372 | 3: nop \n\ |
371 | " | 373 | " |
372 | : "=&r" (unused) | 374 | : "=&r" (unused) |
373 | : "r" (&MDREFR), "r" (cclkcfg), | 375 | : "r" (MDREFR), "r" (cclkcfg), |
374 | "r" (preset_mdrefr), "r" (postset_mdrefr) | 376 | "r" (preset_mdrefr), "r" (postset_mdrefr) |
375 | : "r4", "r5"); | 377 | : "r4", "r5"); |
376 | local_irq_restore(flags); | 378 | local_irq_restore(flags); |