summaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-06 09:47:02 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-03-10 12:55:40 +0900
commit2ef7f0dab6b3d171b6aff00a47077385ae3155b5 (patch)
tree6066996e7dfc65b02470ae4c1c96c6c7c70965a6 /arch/sh/include
parentedab56f4c90f45ba4e61d06d3fc9658da4e94bde (diff)
downloadblackbird-op-linux-2ef7f0dab6b3d171b6aff00a47077385ae3155b5.tar.gz
blackbird-op-linux-2ef7f0dab6b3d171b6aff00a47077385ae3155b5.zip
sh: hibernation support
Add Suspend-to-disk / swsusp / CONFIG_HIBERNATION support to the SuperH architecture. To suspend, use "swapon /dev/sda2; echo disk > /sys/power/state" To resume, pass "resume=/dev/sda2" on the kernel command line. The patch "pm: rework includes, remove arch ifdefs V2" is needed to allow the generic swsusp code to build properly. Hibernation is not enabled with this patch though, a patch setting ARCH_HIBERNATION_POSSIBLE will be submitted later. 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/sections.h1
-rw-r--r--arch/sh/include/asm/suspend.h13
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h
index 8f8f4ad400df..01a4076a3719 100644
--- a/arch/sh/include/asm/sections.h
+++ b/arch/sh/include/asm/sections.h
@@ -3,6 +3,7 @@
#include <asm-generic/sections.h>
+extern void __nosave_begin, __nosave_end;
extern long __machvec_start, __machvec_end;
extern char __uncached_start, __uncached_end;
extern char _ebss[];
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h
new file mode 100644
index 000000000000..5d6d8aba5682
--- /dev/null
+++ b/arch/sh/include/asm/suspend.h
@@ -0,0 +1,13 @@
+#ifndef _ASM_SH_SUSPEND_H
+#define _ASM_SH_SUSPEND_H
+
+static inline int arch_prepare_suspend(void) { return 0; }
+
+#include <asm/ptrace.h>
+
+struct swsusp_arch_regs {
+ struct pt_regs user_regs;
+ unsigned long bank1_regs[8];
+};
+
+#endif /* _ASM_SH_SUSPEND_H */
OpenPOWER on IntegriCloud