aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/cm-x2xx.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/cm-x2xx.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/cm-x2xx.c')
-rw-r--r--arch/arm/mach-pxa/cm-x2xx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
index 47e242005fac..b734d8468168 100644
--- a/arch/arm/mach-pxa/cm-x2xx.c
+++ b/arch/arm/mach-pxa/cm-x2xx.c
@@ -24,6 +24,7 @@
24#include <mach/pxa2xx-regs.h> 24#include <mach/pxa2xx-regs.h>
25#include <mach/audio.h> 25#include <mach/audio.h>
26#include <mach/pxafb.h> 26#include <mach/pxafb.h>
27#include <mach/smemc.h>
27 28
28#include <asm/hardware/it8152.h> 29#include <asm/hardware/it8152.h>
29 30
@@ -392,9 +393,9 @@ static int cmx2xx_suspend(struct sys_device *dev, pm_message_t state)
392 cmx2xx_pci_suspend(); 393 cmx2xx_pci_suspend();
393 394
394 /* save MSC registers */ 395 /* save MSC registers */
395 sleep_save_msc[0] = MSC0; 396 sleep_save_msc[0] = __raw_readl(MSC0);
396 sleep_save_msc[1] = MSC1; 397 sleep_save_msc[1] = __raw_readl(MSC1);
397 sleep_save_msc[2] = MSC2; 398 sleep_save_msc[2] = __raw_readl(MSC2);
398 399
399 /* setup power saving mode registers */ 400 /* setup power saving mode registers */
400 PCFR = 0x0; 401 PCFR = 0x0;
@@ -416,9 +417,9 @@ static int cmx2xx_resume(struct sys_device *dev)
416 cmx2xx_pci_resume(); 417 cmx2xx_pci_resume();
417 418
418 /* restore MSC registers */ 419 /* restore MSC registers */
419 MSC0 = sleep_save_msc[0]; 420 __raw_writel(sleep_save_msc[0], MSC0);
420 MSC1 = sleep_save_msc[1]; 421 __raw_writel(sleep_save_msc[1], MSC1);
421 MSC2 = sleep_save_msc[2]; 422 __raw_writel(sleep_save_msc[2], MSC2);
422 423
423 return 0; 424 return 0;
424} 425}