diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-29 06:52:06 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-29 22:55:24 -0400 |
commit | 159f8cd99ea0e3613cbb6aeea574af438f33d8d7 (patch) | |
tree | 109b7077c55f3a98a19468f8641097c756b0554b | |
parent | da14909eb0749c2788fc704be6dbdebb620602f6 (diff) |
sh: Allow boards to register memory pre/post sleep code
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>
-rw-r--r-- | arch/sh/include/asm/suspend.h | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/shmobile/pm.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/sh/include/asm/suspend.h b/arch/sh/include/asm/suspend.h index d1cc5221645d..fab58cc2ecd9 100644 --- a/arch/sh/include/asm/suspend.h +++ b/arch/sh/include/asm/suspend.h | |||
@@ -30,6 +30,10 @@ extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list; | |||
30 | #define SH_MOBILE_PRE(x) (x) | 30 | #define SH_MOBILE_PRE(x) (x) |
31 | #define SH_MOBILE_POST(x) (-(x)) | 31 | #define SH_MOBILE_POST(x) (-(x)) |
32 | 32 | ||
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); | ||
33 | #endif | 37 | #endif |
34 | 38 | ||
35 | /* flags passed to assembly suspend code */ | 39 | /* flags passed to assembly suspend code */ |
diff --git a/arch/sh/kernel/cpu/shmobile/pm.c b/arch/sh/kernel/cpu/shmobile/pm.c index 7ebf8cf89242..b424747e4252 100644 --- a/arch/sh/kernel/cpu/shmobile/pm.c +++ b/arch/sh/kernel/cpu/shmobile/pm.c | |||
@@ -60,6 +60,12 @@ void sh_mobile_call_standby(unsigned long mode) | |||
60 | mode, NULL); | 60 | mode, NULL); |
61 | } | 61 | } |
62 | 62 | ||
63 | void sh_mobile_register_self_refresh(unsigned long flags, | ||
64 | void *pre_start, void *pre_end, | ||
65 | void *post_start, void *post_end) | ||
66 | { | ||
67 | } | ||
68 | |||
63 | static int sh_pm_enter(suspend_state_t state) | 69 | static int sh_pm_enter(suspend_state_t state) |
64 | { | 70 | { |
65 | local_irq_disable(); | 71 | local_irq_disable(); |