Skip to contentSkip to conversation

sh: Allow boards to register memory pre/post sleep code

PATCH In review Magnus Damm 1 participant 1 message Oct 29, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/7 sh: Allow boards to register memory pre/post sleep code

From: Magnus Damm <[email protected]>

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.

---

 arch/sh/include/asm/suspend.h    |    4 ++++
 arch/sh/kernel/cpu/shmobile/pm.c |    6 ++++++
 2 files changed, 10 insertions(+)
arch/sh/include/asm/suspend.h +4 -0
@@ -30,6 +30,10 @@ extern struct atomic_notifier_head sh_mo
 #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 */
arch/sh/kernel/cpu/shmobile/pm.c +6 -0
@@ -60,6 +60,12 @@ void sh_mobile_call_standby(unsigned lon
 				   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();