Magnus Damm | 2ef7f0d | 2009-03-06 09:47:02 +0000 | [diff] [blame] | 1 | #ifndef _ASM_SH_SUSPEND_H |
| 2 | #define _ASM_SH_SUSPEND_H |
| 3 | |
Magnus Damm | 7759491 | 2009-03-13 15:23:04 +0000 | [diff] [blame] | 4 | #ifndef __ASSEMBLY__ |
Magnus Damm | 49f4264 | 2009-10-29 10:51:48 +0000 | [diff] [blame] | 5 | #include <linux/notifier.h> |
Magnus Damm | 2ef7f0d | 2009-03-06 09:47:02 +0000 | [diff] [blame] | 6 | static inline int arch_prepare_suspend(void) { return 0; } |
| 7 | |
| 8 | #include <asm/ptrace.h> |
| 9 | |
| 10 | struct swsusp_arch_regs { |
| 11 | struct pt_regs user_regs; |
| 12 | unsigned long bank1_regs[8]; |
| 13 | }; |
Magnus Damm | 7426394 | 2009-07-03 10:28:00 +0000 | [diff] [blame] | 14 | |
| 15 | void sh_mobile_call_standby(unsigned long mode); |
| 16 | |
| 17 | #ifdef CONFIG_CPU_IDLE |
| 18 | void sh_mobile_setup_cpuidle(void); |
| 19 | #else |
| 20 | static inline void sh_mobile_setup_cpuidle(void) {} |
| 21 | #endif |
| 22 | |
Magnus Damm | 49f4264 | 2009-10-29 10:51:48 +0000 | [diff] [blame] | 23 | /* notifier chains for pre/post sleep hooks */ |
| 24 | extern struct atomic_notifier_head sh_mobile_pre_sleep_notifier_list; |
| 25 | extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list; |
| 26 | |
| 27 | /* priority levels for notifiers */ |
| 28 | #define SH_MOBILE_SLEEP_BOARD 0 |
| 29 | #define SH_MOBILE_SLEEP_CPU 1 |
| 30 | #define SH_MOBILE_PRE(x) (x) |
| 31 | #define SH_MOBILE_POST(x) (-(x)) |
| 32 | |
Magnus Damm | 159f8cd | 2009-10-29 10:52:06 +0000 | [diff] [blame] | 33 | /* board code registration function for self-refresh assembly snippets */ |
| 34 | void sh_mobile_register_self_refresh(unsigned long flags, |
| 35 | void *pre_start, void *pre_end, |
| 36 | void *post_start, void *post_end); |
Magnus Damm | 7759491 | 2009-03-13 15:23:04 +0000 | [diff] [blame] | 37 | #endif |
| 38 | |
| 39 | /* flags passed to assembly suspend code */ |
| 40 | #define SUSP_SH_SLEEP (1 << 0) /* Regular sleep mode */ |
| 41 | #define SUSP_SH_STANDBY (1 << 1) /* SH-Mobile Software standby mode */ |
| 42 | #define SUSP_SH_RSTANDBY (1 << 2) /* SH-Mobile R-standby mode */ |
| 43 | #define SUSP_SH_USTANDBY (1 << 3) /* SH-Mobile U-standby mode */ |
| 44 | #define SUSP_SH_SF (1 << 4) /* Enable self-refresh */ |
Magnus Damm | 2ef7f0d | 2009-03-06 09:47:02 +0000 | [diff] [blame] | 45 | |
| 46 | #endif /* _ASM_SH_SUSPEND_H */ |