Skip to content

Commit

Permalink
sh: Allow boards to register memory pre/post sleep code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 30, 2009
1 parent da14909 commit 159f8cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/sh/include/asm/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ extern struct atomic_notifier_head sh_mobile_post_sleep_notifier_list;
#define SH_MOBILE_PRE(x) (x)
#define SH_MOBILE_POST(x) (-(x))

/* board code registration function for self-refresh assembly snippets */
void sh_mobile_register_self_refresh(unsigned long flags,
void *pre_start, void *pre_end,
void *post_start, void *post_end);
#endif

/* flags passed to assembly suspend code */
Expand Down
6 changes: 6 additions & 0 deletions arch/sh/kernel/cpu/shmobile/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ void sh_mobile_call_standby(unsigned long mode)
mode, NULL);
}

void sh_mobile_register_self_refresh(unsigned long flags,
void *pre_start, void *pre_end,
void *post_start, void *post_end)
{
}

static int sh_pm_enter(suspend_state_t state)
{
local_irq_disable();
Expand Down

0 comments on commit 159f8cd

Please sign in to comment.