diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-03 10:28:00 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-05 00:29:54 +0900 |
commit | 7426394f20c2e74b7c560bcd266cec1b327a269b (patch) | |
tree | 5003c509c9cf29caf598e956881bb9a3d65f0bf9 /arch/sh/include | |
parent | a61c1a636628a28ab5b42a9d36582a8f6a08893a (diff) |
sh: cpuidle for SuperH Mobile using hwblk
This patch adds cpuidle support for SuperH Mobile.
The sleep mode selected by cpuidle is compared with
the mode selected by the hwblk sleep code and the
best allowed mode is entered.
At this point "Sleep mode" and "Sleep mode + SF" are
supported. This code can easily be extended to support
"Software suspend mode", but the assembly code must
first be updated to avoid loosing interrupts.
Also, update the code to only copy the assembly snippet
into internal memory once at bootup.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/suspend.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h index b1b995370e7..5c8ea28ff7a 100644 --- a/arch/sh/include/asm/suspend.h +++ b/arch/sh/include/asm/suspend.h @@ -10,6 +10,15 @@ struct swsusp_arch_regs { struct pt_regs user_regs; unsigned long bank1_regs[8]; }; + +void sh_mobile_call_standby(unsigned long mode); + +#ifdef CONFIG_CPU_IDLE +void sh_mobile_setup_cpuidle(void); +#else +static inline void sh_mobile_setup_cpuidle(void) {} +#endif + #endif /* flags passed to assembly suspend code */ |