sh: Add R-Standby support
PATCH 6/7 sh: Add R-Standby support
From: Magnus Damm <[email protected]>
Add experimental R-standby support for sh7724. Right now only the kfr2r09 board is enabled. This should obviously not be board dependent in the future.
Not-Signed-off-by Magnus Damm <[email protected]>
---
arch/sh/kernel/cpu/shmobile/pm.c | 11 +++-- arch/sh/kernel/cpu/shmobile/sleep.S | 69 ++++++++++++++++++++++++++++++----- 2 files changed, 68 insertions(+), 12 deletions(-)
arch/sh/kernel/cpu/shmobile/pm.c +7 -4
@@ -23,16 +23,15 @@* Sleep mode is just plain "sleep" instruction * Sleep Self-Refresh mode is above plus RAM put in Self-Refresh * Standby Self-Refresh mode is above plus stopped clocks +* R-standby turns off the main power domain */ #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_BSC | SUSP_SH_SF)/* -* The following modes are not there yet: -* -* R-standby mode is unsupported, but will be added in the future -* U-standby mode is low priority since it needs bootloader hacks +* U-standby mode is unsupported since it needs bootloader hacks */ #ifdef CONFIG_CPU_SUBTYPE_SH7724
@@ -61,7 +60,11 @@ static int sh_pm_enter(suspend_state_t s {local_irq_disable ();set_bl_bit (); +#ifdef CONFIG_SH_KFR2R09 +sh_mobile_call_standby (SUSP_MODE_RSTANDBY ); +#else sh_mobile_call_standby (SUSP_MODE_STANDBY_SF ); +#endif local_irq_disable ();clear_bl_bit ();return 0 ;
arch/sh/kernel/cpu/shmobile/sleep.S +61 -8
111 lines not on this page · raw message