diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-30 04:24:07 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-30 14:36:52 +0900 |
commit | 323ef8dba67fb7b9c709457bd0374d88cfb8f25f (patch) | |
tree | f8d4ae7d78837f13970fecdba061fc0df818ae11 /arch/sh/include/asm/suspend.h | |
parent | eb0cd9e88c6a6561055b32a17d44d8918aecc3c7 (diff) | |
download | blackbird-op-linux-323ef8dba67fb7b9c709457bd0374d88cfb8f25f.tar.gz blackbird-op-linux-323ef8dba67fb7b9c709457bd0374d88cfb8f25f.zip |
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/asm/suspend.h')
-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; void sh_mobile_register_self_refresh(unsigned long flags, void *pre_start, void *pre_end, void *post_start, void *post_end); + +/* register structure for address/data information */ +struct sh_sleep_regs { + unsigned long stbcr; +}; + +/* data area for low-level sleep code */ +struct sh_sleep_data { + /* current sleep mode (SUSP_SH_...) */ + unsigned long mode; + + /* addresses of board specific self-refresh snippets */ + unsigned long sf_pre; + unsigned long sf_post; + + /* register state saved and restored by the assembly code */ + unsigned long vbr; + unsigned long spc; + unsigned long sr; + + /* structure for keeping register addresses */ + struct sh_sleep_regs addr; + + /* structure for saving/restoring register state */ + struct sh_sleep_regs data; +}; + #endif /* flags passed to assembly suspend code */ |