aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-13 11:23:04 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-03-16 06:52:53 -0400
commit7759491274bc5ba7cd72b3b9cc5ec8247b937efb (patch)
treef6e98001aa8296220e429c30ac3a8cc42b8cc95d /arch/sh/include
parent7a516280b6a99634933b417834e178bde8659da1 (diff)
sh: SuperH Mobile suspend support
This patch contains CONFIG_SUSPEND support to the SuperH architecture. If enabled, SuperH Mobile processors will register their suspend callbacks during boot. To suspend, use "echo mem > /sys/power/state". To allow wakeup, make sure "/sys/device/platform/../power/wakeup" contains "enabled". Additional per-device driver patches are most likely needed. 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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h
index 5d6d8aba5682..b1b995370e79 100644
--- a/arch/sh/include/asm/suspend.h
+++ b/arch/sh/include/asm/suspend.h
@@ -1,6 +1,7 @@
1#ifndef _ASM_SH_SUSPEND_H 1#ifndef _ASM_SH_SUSPEND_H
2#define _ASM_SH_SUSPEND_H 2#define _ASM_SH_SUSPEND_H
3 3
4#ifndef __ASSEMBLY__
4static inline int arch_prepare_suspend(void) { return 0; } 5static inline int arch_prepare_suspend(void) { return 0; }
5 6
6#include <asm/ptrace.h> 7#include <asm/ptrace.h>
@@ -9,5 +10,13 @@ struct swsusp_arch_regs {
9 struct pt_regs user_regs; 10 struct pt_regs user_regs;
10 unsigned long bank1_regs[8]; 11 unsigned long bank1_regs[8];
11}; 12};
13#endif
14
15/* flags passed to assembly suspend code */
16#define SUSP_SH_SLEEP (1 << 0) /* Regular sleep mode */
17#define SUSP_SH_STANDBY (1 << 1) /* SH-Mobile Software standby mode */
18#define SUSP_SH_RSTANDBY (1 << 2) /* SH-Mobile R-standby mode */
19#define SUSP_SH_USTANDBY (1 << 3) /* SH-Mobile U-standby mode */
20#define SUSP_SH_SF (1 << 4) /* Enable self-refresh */
12 21
13#endif /* _ASM_SH_SUSPEND_H */ 22#endif /* _ASM_SH_SUSPEND_H */