diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-06 10:48:39 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-02-22 12:11:23 -0500 |
commit | f6b0fa02e8b0708d17d631afce456524eadf87ff (patch) | |
tree | 900fcd2149a03ba229bb29e982d3d6a5f3d3fcfc /arch/arm/include | |
parent | 753790e713d80b50b867fa1ed32ec0eb5e82ae8e (diff) |
ARM: pm: add generic CPU suspend/resume support
This adds core support for saving and restoring CPU coprocessor
registers for suspend/resume support. This contains support for suspend
with ARM920, ARM926, SA11x0, PXA25x, PXA27x, PXA3xx, V6 and V7 CPUs.
Tested on Assabet and Tegra 2.
Tested-by: Colin Cross <ccross@android.com>
Tested-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/glue-proc.h | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/proc-fns.h | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/glue-proc.h b/arch/arm/include/asm/glue-proc.h index e3bf443f2d18..6469521d092f 100644 --- a/arch/arm/include/asm/glue-proc.h +++ b/arch/arm/include/asm/glue-proc.h | |||
@@ -256,6 +256,9 @@ | |||
256 | #define cpu_dcache_clean_area __glue(CPU_NAME,_dcache_clean_area) | 256 | #define cpu_dcache_clean_area __glue(CPU_NAME,_dcache_clean_area) |
257 | #define cpu_do_switch_mm __glue(CPU_NAME,_switch_mm) | 257 | #define cpu_do_switch_mm __glue(CPU_NAME,_switch_mm) |
258 | #define cpu_set_pte_ext __glue(CPU_NAME,_set_pte_ext) | 258 | #define cpu_set_pte_ext __glue(CPU_NAME,_set_pte_ext) |
259 | #define cpu_suspend_size __glue(CPU_NAME,_suspend_size) | ||
260 | #define cpu_do_suspend __glue(CPU_NAME,_do_suspend) | ||
261 | #define cpu_do_resume __glue(CPU_NAME,_do_resume) | ||
259 | #endif | 262 | #endif |
260 | 263 | ||
261 | #endif | 264 | #endif |
diff --git a/arch/arm/include/asm/proc-fns.h b/arch/arm/include/asm/proc-fns.h index 69802150be22..8ec535e11fd7 100644 --- a/arch/arm/include/asm/proc-fns.h +++ b/arch/arm/include/asm/proc-fns.h | |||
@@ -66,6 +66,11 @@ extern struct processor { | |||
66 | * ignore 'ext'. | 66 | * ignore 'ext'. |
67 | */ | 67 | */ |
68 | void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); | 68 | void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext); |
69 | |||
70 | /* Suspend/resume */ | ||
71 | unsigned int suspend_size; | ||
72 | void (*do_suspend)(void *); | ||
73 | void (*do_resume)(void *); | ||
69 | } processor; | 74 | } processor; |
70 | 75 | ||
71 | #ifndef MULTI_CPU | 76 | #ifndef MULTI_CPU |
@@ -86,6 +91,8 @@ extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); | |||
86 | #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm) | 91 | #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm) |
87 | #endif | 92 | #endif |
88 | 93 | ||
94 | extern void cpu_resume(void); | ||
95 | |||
89 | #include <asm/memory.h> | 96 | #include <asm/memory.h> |
90 | 97 | ||
91 | #ifdef CONFIG_MMU | 98 | #ifdef CONFIG_MMU |