Skip to contentSkip to conversation

sh: SH-Mobile R-standby register save/restore

PATCH New Magnus Damm 1 participant 1 message Feb 25, 2010

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

PATCH 1/1 sh: SH-Mobile R-standby register save/restore

From: Magnus Damm <[email protected]>

Add code to save/restore registers during
R-standby sleep on SH-Mobile processors.

---

Tested on the sh7724 processor using ms7724se and Ecovec.

 arch/sh/include/asm/suspend.h       |    1 
 arch/sh/kernel/cpu/shmobile/pm.c    |    3 
 arch/sh/kernel/cpu/shmobile/sleep.S |  121 ++++++++++++++++++++++++++++++++++-
 3 files changed, 122 insertions(+), 3 deletions(-)
arch/sh/include/asm/suspend.h +1 -0
@@ -92,5 +92,6 @@ extern unsigned long sh_mobile_sleep_sup
 #define SUSP_SH_USTANDBY	(1 << 3) /* SH-Mobile U-standby mode */
 #define SUSP_SH_SF		(1 << 4) /* Enable self-refresh */
 #define SUSP_SH_MMU		(1 << 5) /* Save/restore MMU and cache */
+#define SUSP_SH_REGS		(1 << 6) /* Save/restore registers */
 
 #endif /* _ASM_SH_SUSPEND_H */
arch/sh/kernel/cpu/shmobile/pm.c +2 -1
@@ -33,7 +33,8 @@ ATOMIC_NOTIFIER_HEAD(sh_mobile_post_slee
 #define SUSP_MODE_SLEEP		(SUSP_SH_SLEEP)
 #define SUSP_MODE_SLEEP_SF	(SUSP_SH_SLEEP | SUSP_SH_SF)
 #define SUSP_MODE_STANDBY_SF	(SUSP_SH_STANDBY | SUSP_SH_SF)
-#define SUSP_MODE_RSTANDBY	(SUSP_SH_RSTANDBY | SUSP_SH_MMU | SUSP_SH_SF)
+#define SUSP_MODE_RSTANDBY_SF \
+	(SUSP_SH_RSTANDBY | SUSP_SH_MMU | SUSP_SH_REGS | SUSP_SH_SF)
  /*
   * U-standby mode is unsupported since it needs bootloader hacks
   */
arch/sh/kernel/cpu/shmobile/sleep.S +119 -2

152 lines not on this page · raw message