aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Haslam <axelhaslam@ti.com>2011-07-14 16:14:30 -0700
committerNishanth Menon <nm@ti.com>2011-07-23 12:07:04 -0500
commit05608b1a3db6f80ec4fe4b36556f367268b42212 (patch)
tree4dfd9f33b609a970f5db31efd704fbea83186675
parent57c522bb90e3041ba9dac30e2aba91ce17d5e6c0 (diff)
downloadkernel_samsung_tuna-05608b1a3db6f80ec4fe4b36556f367268b42212.zip
kernel_samsung_tuna-05608b1a3db6f80ec4fe4b36556f367268b42212.tar.gz
kernel_samsung_tuna-05608b1a3db6f80ec4fe4b36556f367268b42212.tar.bz2
OMAP4: PM: allow sleep to know if called inline of suspend
omap4_enter_sleep has no differentiation between idle and suspend at the moment. by introducing suspend differentiation, we can now selectively do operations in subsequent patches such as selective disable/enable of SmartReflex etc. Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Axel Haslam <axelhaslam@ti.com>
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c2
-rw-r--r--arch/arm/mach-omap2/pm.h3
-rw-r--r--arch/arm/mach-omap2/pm44xx.c5
3 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 81a4d0d..bb97206 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -150,7 +150,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
if (cx->type > OMAP4_STATE_C1)
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
- omap4_enter_sleep(dev->cpu, cx->cpu0_state);
+ omap4_enter_sleep(dev->cpu, cx->cpu0_state, false);
/* restore the MPU and CORE states to ON */
omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index f191fdc..249d8b4 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -22,7 +22,8 @@ extern int omap3_can_sleep(void);
extern int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state);
extern int omap3_idle_init(void);
extern int omap4_idle_init(void);
-extern void omap4_enter_sleep(unsigned int cpu, unsigned int power_state);
+extern void omap4_enter_sleep(unsigned int cpu, unsigned int power_state,
+ bool suspend);
extern void omap4_trigger_ioctrl(void);
#if defined(CONFIG_PM_OPP)
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 79fa0bc..75aca94 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -85,7 +85,8 @@ void omap4_trigger_ioctrl(void)
/* This is a common low power function called from suspend and
* cpuidle
*/
-void omap4_enter_sleep(unsigned int cpu, unsigned int power_state)
+
+void omap4_enter_sleep(unsigned int cpu, unsigned int power_state, bool suspend)
{
int cpu0_next_state = PWRDM_POWER_ON;
int per_next_state = PWRDM_POWER_ON;
@@ -240,7 +241,7 @@ static int omap4_pm_suspend(void)
* domain CSWR is not supported by hardware.
* More details can be found in OMAP4430 TRM section 4.3.4.2.
*/
- omap4_enter_sleep(0, PWRDM_POWER_OFF);
+ omap4_enter_sleep(0, PWRDM_POWER_OFF, true);
omap4_print_wakeirq();
/* Disable wake-up irq's */