aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/suspend.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-02-26sh: SH-Mobile R-standby register save/restoreMagnus Damm1-0/+1
Add code to save/restore registers during R-standby sleep on SH-Mobile processors. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Add R-standby sleep mode supportMagnus Damm1-0/+5
Add R-standby specific bits to the SuperH Mobile sleep code. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Add MMU and Cache handling sleep mode codeMagnus Damm1-0/+15
Add MMU and cache handling functionality to the SuperH Mobile sleep code. The MMU and cache registers are saved and restored. The MMU is disabled and the cache is flushed and disabled before entering sleep modes if the SUSP_SH_MMU flag is set. This flag should be set in the case of R-standby and most likely for future U-standby support as well. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Keep track of allowed sleep modesMagnus Damm1-0/+3
Add code to keep track of supported sleep modes. This to only export cpuidle modes that are backed by board support code. Also, do not allow suspend-to-ram if sdram board code is missing. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Rework SuperH Mobile sleep mode codeMagnus Damm1-0/+27
Rework the SuperH Mobile sleep code from including board specific code to allowing each board to provide pre/post code snippets. These snippets should contain sdram management code to enter and leave self-refresh. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Allow boards to register memory pre/post sleep codeMagnus Damm1-0/+4
Add code to allow boards registering self-contained functions for going to/from self-refresh. At this point the board code is unused. When all supported boards have been converted then the new sleep code will make use of these functions. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-30sh: Add notifiers chains for cpu/board codeMagnus Damm1-0/+11
This patch adds atomic notifier chains for pre/post sleep events. Useful for cpu code and boards that need to save and restore register state before and after entering a sleep mode. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-05sh: cpuidle for SuperH Mobile using hwblkMagnus Damm1-0/+9
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>
2009-03-16sh: SuperH Mobile suspend supportMagnus Damm1-0/+9
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>
2009-03-10sh: hibernation supportMagnus Damm1-0/+13
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>