aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2013-06-05 03:45:53 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-06-17 03:06:47 -0400
commite26f4067405872b5d8b9efea9fc48cda97e39fc2 (patch)
tree3220ae2befbf96b5d73df781c2b146cff7ef5a78
parent4f309d272f7139278f52cf1e2dcf5b2bc8c029d9 (diff)
ARM: shmobile: Rework sh7372 sleep code to use virt_to_phys()
Instead of having a hard coded virt-to-phys address conversion code in sleep-sh7372.S, rework the code to do the conversion in C using virt_to_phys(). This removes the need for PLAT_PHYS_OFFSET which in turn is needed for ARCH_MULTIPLATFORM. Signed-off-by: Magnus Damm <damm@opensource.se> [horms+renesas@verge.net.au: squashed in build fix posted as "ARM: shmobile: sh7372 build fix for SUSPEND=n && CPU_IDLE=n"] Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--arch/arm/mach-shmobile/include/mach/sh7372.h2
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c3
-rw-r--r--arch/arm/mach-shmobile/sleep-sh7372.S5
3 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
index e882717ca97f..854a9f0ca040 100644
--- a/arch/arm/mach-shmobile/include/mach/sh7372.h
+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
@@ -75,6 +75,8 @@ extern void sh7372_intcs_resume(void);
75extern void sh7372_intca_suspend(void); 75extern void sh7372_intca_suspend(void);
76extern void sh7372_intca_resume(void); 76extern void sh7372_intca_resume(void);
77 77
78extern unsigned long sh7372_cpu_resume;
79
78#ifdef CONFIG_PM 80#ifdef CONFIG_PM
79extern void __init sh7372_init_pm_domains(void); 81extern void __init sh7372_init_pm_domains(void);
80#else 82#else
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
index dec9293bb90d..0de75fd394b9 100644
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ b/arch/arm/mach-shmobile/pm-sh7372.c
@@ -351,6 +351,9 @@ static void sh7372_enter_a4s_common(int pllc0_on)
351 351
352static void sh7372_pm_setup_smfram(void) 352static void sh7372_pm_setup_smfram(void)
353{ 353{
354 /* pass physical address of cpu_resume() to assembly resume code */
355 sh7372_cpu_resume = virt_to_phys(cpu_resume);
356
354 memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100); 357 memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
355} 358}
356#else 359#else
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S
index a9df53b69ab8..53f4840e4949 100644
--- a/arch/arm/mach-shmobile/sleep-sh7372.S
+++ b/arch/arm/mach-shmobile/sleep-sh7372.S
@@ -40,7 +40,10 @@
40 .global sh7372_resume_core_standby_sysc 40 .global sh7372_resume_core_standby_sysc
41sh7372_resume_core_standby_sysc: 41sh7372_resume_core_standby_sysc:
42 ldr pc, 1f 42 ldr pc, 1f
431: .long cpu_resume - PAGE_OFFSET + PLAT_PHYS_OFFSET 43
44 .globl sh7372_cpu_resume
45sh7372_cpu_resume:
461: .space 4
44 47
45#define SPDCR 0xe6180008 48#define SPDCR 0xe6180008
46 49