diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-08-25 12:53:01 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 16:07:27 +0200 |
commit | d186bdcfb65ce02254cc1ab6d4101ae08f8eb410 (patch) | |
tree | 66ae433d086460b937e010225746323d6caa887d /arch | |
parent | c79b5a77a6abe4a5e82a8784e20431fbe925d93a (diff) |
ARM: ux500: suspend: Run suspend/resume at ARM_OPP 100
Force all suspend/resume hooks to run at ARM_OPP 100
minimize suspend/resume latency.
ST-Ericsson Linux next: Not tested, ask SSM for ER
ST-Ericsson ID: ER356920
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Id495e6d25cd7b3bf6417ad26572a05dd733f6416
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29444
Reviewed-by: Magnus TEMPLING <magnus.templing@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend_dbg.h | 5 |
2 files changed, 23 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/pm/suspend.c b/arch/arm/mach-ux500/pm/suspend.c index 4a4f0071a6e..ef3eaa64bf1 100644 --- a/arch/arm/mach-ux500/pm/suspend.c +++ b/arch/arm/mach-ux500/pm/suspend.c @@ -18,6 +18,7 @@ #include <mach/prcmu.h> #include <mach/prcmu-regs.h> +#include <mach/prcmu-qos.h> #include "context.h" #include "pm.h" @@ -210,17 +211,34 @@ static void ux500_suspend_wake(void) (void)prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); } +static int ux500_suspend_begin(suspend_state_t state) +{ + prcmu_qos_update_requirement(PRCMU_QOS_ARM_OPP, + "suspend", 100); + return ux500_suspend_dbg_begin(state); +} + +static void ux500_suspend_end(void) +{ + prcmu_qos_update_requirement(PRCMU_QOS_ARM_OPP, + "suspend", 25); +} + static struct platform_suspend_ops ux500_suspend_ops = { .enter = ux500_suspend_enter, .valid = ux500_suspend_valid, .prepare_late = ux500_suspend_prepare_late, .wake = ux500_suspend_wake, - .begin = ux500_suspend_dbg_begin, + .begin = ux500_suspend_begin, + .end = ux500_suspend_end, }; static __init int ux500_suspend_init(void) { ux500_suspend_dbg_init(); + + prcmu_qos_add_requirement(PRCMU_QOS_ARM_OPP, "suspend", 25); + suspend_set_ops(&ux500_suspend_ops); return 0; } diff --git a/arch/arm/mach-ux500/pm/suspend_dbg.h b/arch/arm/mach-ux500/pm/suspend_dbg.h index 46cbe6e7014..bd2afb93472 100644 --- a/arch/arm/mach-ux500/pm/suspend_dbg.h +++ b/arch/arm/mach-ux500/pm/suspend_dbg.h @@ -53,7 +53,10 @@ static inline bool ux500_suspend_deepsleep_enabled(void) static inline void ux500_suspend_dbg_sleep_status(bool is_deepsleep) { } static inline void ux500_suspend_dbg_init(void) { } -#define ux500_suspend_dbg_begin NULL +static inline int ux500_suspend_dbg_begin(suspend_state_t state) +{ + return 0; +} #endif |