diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-03-04 10:25:45 +0000 |
---|---|---|
committer | Paul Burton <paul.burton@imgtec.com> | 2014-05-02 16:39:10 +0100 |
commit | 74e91335190c628b870c69cff8360d23707b1f53 (patch) | |
tree | 255cb7709b6123938c057f206522f00e2b450d9f /arch/mips/kernel/pm.c | |
parent | eaa38d6343adbb5070c27af29aeeb3df126f47f2 (diff) | |
download | op-kernel-dev-74e91335190c628b870c69cff8360d23707b1f53.zip op-kernel-dev-74e91335190c628b870c69cff8360d23707b1f53.tar.gz |
MIPS: PM: Implement PM helper macros
Implement assembler helper macros in asm/pm.h for platform code to use
for saving context across low power states - for example suspend to RAM
or powered down cpuidle states. Macros are provided for saving and
restoring the main CPU context used by C code and doing important
configuration which must be done very early during resume. Notably EVA
needs segmentation control registers to be restored before the stack or
dynamically allocated memory is accessed, so that state is saved in
global data.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Diffstat (limited to 'arch/mips/kernel/pm.c')
-rw-r--r-- | arch/mips/kernel/pm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/kernel/pm.c b/arch/mips/kernel/pm.c index 112903f..fefdf39 100644 --- a/arch/mips/kernel/pm.c +++ b/arch/mips/kernel/pm.c @@ -15,8 +15,12 @@ #include <asm/dsp.h> #include <asm/fpu.h> #include <asm/mmu_context.h> +#include <asm/pm.h> #include <asm/watch.h> +/* Used by PM helper macros in asm/pm.h */ +struct mips_static_suspend_state mips_static_suspend_state; + /** * mips_cpu_save() - Save general CPU state. * Ensures that general CPU context is saved, notably FPU and DSP. |