aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/cpufreq-pxa2xx.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-11-03 11:29:35 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-12-16 01:31:16 -0500
commitad68bb9f7a3cd47396635a5e3895215af57579da (patch)
tree6d9890bc0112b637e95afa0129a08fc20e325234 /arch/arm/mach-pxa/cpufreq-pxa2xx.c
parent851982c1b6ca18cedf6d01e4529a0c1ddb30771e (diff)
ARM: pxa: Access SMEMC via virtual addresses
This is important because on PXA3xx, the physical mapping of SMEMC registers differs from the one on PXA2xx. In order to get PCMCIA working on both PXA2xx and PXA320, the PCMCIA driver was adjusted accordingly as well. Also, various places in the kernel had to be patched to use __raw_read/__raw_write. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/cpufreq-pxa2xx.c')
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa2xx.c10
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
45static unsigned int freq_debug; 47static unsigned int freq_debug;
@@ -242,7 +244,7 @@ static void pxa27x_guess_max_freq(void)
242 244
243static void init_sdram_rows(void) 245static 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,
3703: nop \n\ 3723: 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);