diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-30 00:24:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-30 01:36:52 -0400 |
commit | 323ef8dba67fb7b9c709457bd0374d88cfb8f25f (patch) | |
tree | f8d4ae7d78837f13970fecdba061fc0df818ae11 /arch/sh/include | |
parent | eb0cd9e88c6a6561055b32a17d44d8918aecc3c7 (diff) |
sh: Rework SuperH Mobile sleep mode code
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>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/suspend.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h index fab58cc2ecd9..8e2c55dc5fe6 100644 --- a/arch/sh/include/asm/suspend.h +++ b/arch/sh/include/asm/suspend.h | |||
@@ -34,6 +34,33 @@ extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list; | |||
34 | void sh_mobile_register_self_refresh(unsigned long flags, | 34 | void sh_mobile_register_self_refresh(unsigned long flags, |
35 | void *pre_start, void *pre_end, | 35 | void *pre_start, void *pre_end, |
36 | void *post_start, void *post_end); | 36 | void *post_start, void *post_end); |
37 | |||
38 | /* register structure for address/data information */ | ||
39 | struct sh_sleep_regs { | ||
40 | unsigned long stbcr; | ||
41 | }; | ||
42 | |||
43 | /* data area for low-level sleep code */ | ||
44 | struct sh_sleep_data { | ||
45 | /* current sleep mode (SUSP_SH_...) */ | ||
46 | unsigned long mode; | ||
47 | |||
48 | /* addresses of board specific self-refresh snippets */ | ||
49 | unsigned long sf_pre; | ||
50 | unsigned long sf_post; | ||
51 | |||
52 | /* register state saved and restored by the assembly code */ | ||
53 | unsigned long vbr; | ||
54 | unsigned long spc; | ||
55 | unsigned long sr; | ||
56 | |||
57 | /* structure for keeping register addresses */ | ||
58 | struct sh_sleep_regs addr; | ||
59 | |||
60 | /* structure for saving/restoring register state */ | ||
61 | struct sh_sleep_regs data; | ||
62 | }; | ||
63 | |||
37 | #endif | 64 | #endif |
38 | 65 | ||
39 | /* flags passed to assembly suspend code */ | 66 | /* flags passed to assembly suspend code */ |