diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-03 06:28:00 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-04 11:29:54 -0400 |
commit | 7426394f20c2e74b7c560bcd266cec1b327a269b (patch) | |
tree | 5003c509c9cf29caf598e956881bb9a3d65f0bf9 /arch/sh/include/asm | |
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/asm')
-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 b1b995370e79..5c8ea28ff7a4 100644 --- a/arch/sh/include/asm/suspend.h +++ b/arch/sh/include/asm/suspend.h | |||
@@ -10,6 +10,15 @@ struct swsusp_arch_regs { | |||
10 | struct pt_regs user_regs; | 10 | struct pt_regs user_regs; |
11 | unsigned long bank1_regs[8]; | 11 | unsigned long bank1_regs[8]; |
12 | }; | 12 | }; |
13 | |||
14 | void sh_mobile_call_standby(unsigned long mode); | ||
15 | |||
16 | #ifdef CONFIG_CPU_IDLE | ||
17 | void sh_mobile_setup_cpuidle(void); | ||
18 | #else | ||
19 | static inline void sh_mobile_setup_cpuidle(void) {} | ||
20 | #endif | ||
21 | |||
13 | #endif | 22 | #endif |
14 | 23 | ||
15 | /* flags passed to assembly suspend code */ | 24 | /* flags passed to assembly suspend code */ |