aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-11-03 22:09:11 -0700
committerColin Cross <ccross@android.com>2011-11-03 22:09:11 -0700
commitf1e5f49f2f2ed46e5356e091de1e86dc08b20d85 (patch)
treebfc8970948e006af8069a5f732bbd59c0f18bf34 /arch/arm/mach-omap2/pm44xx.c
parent70c7a98bb28405787cf7aaf9d8a216b559bd4a35 (diff)
parent90672f17369273aba3fb402d5c41752686c65d53 (diff)
downloadkernel_samsung_tuna-f1e5f49f2f2ed46e5356e091de1e86dc08b20d85.zip
kernel_samsung_tuna-f1e5f49f2f2ed46e5356e091de1e86dc08b20d85.tar.gz
kernel_samsung_tuna-f1e5f49f2f2ed46e5356e091de1e86dc08b20d85.tar.bz2
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Conflicts: arch/arm/mach-omap2/dpll3xxx.c Change-Id: Ie53daed5cabbadef73d18969263ff2f7b77b3dc7
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rwxr-xr-xarch/arm/mach-omap2/pm44xx.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 8c21358..8b47481 100755
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -142,6 +142,7 @@ void omap4_enter_sleep(unsigned int cpu, unsigned int power_state, bool suspend)
int per_next_state = PWRDM_POWER_ON;
int core_next_state = PWRDM_POWER_ON;
int mpu_next_state = PWRDM_POWER_ON;
+ int ret;
pwrdm_clear_all_prev_pwrst(cpu0_pwrdm);
pwrdm_clear_all_prev_pwrst(mpu_pwrdm);
@@ -154,6 +155,10 @@ void omap4_enter_sleep(unsigned int cpu, unsigned int power_state, bool suspend)
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
+ ret = omap2_gpio_prepare_for_idle(omap4_device_next_state_off());
+ if (ret)
+ goto abort_gpio;
+
if (mpu_next_state < PWRDM_POWER_INACTIVE) {
if (omap_dvfs_is_scaling(mpu_voltdm)) {
mpu_next_state = PWRDM_POWER_INACTIVE;
@@ -190,10 +195,7 @@ void omap4_enter_sleep(unsigned int cpu, unsigned int power_state, bool suspend)
}
}
- omap2_gpio_set_edge_wakeup();
-
if (omap4_device_next_state_off()) {
- omap2_gpio_prepare_for_idle(true);
omap_gpmc_save_context();
omap_dma_global_context_save();
}
@@ -248,26 +250,21 @@ abort_device_off:
}
if (omap4_device_next_state_off()) {
- /*
- * GPIO: since we have put_synced clks, we need to resume
- * even if OFF was not really achieved
- */
- omap2_gpio_resume_after_idle();
-
/* Disable the extension of Non-EMIF I/O isolation */
omap4_prminst_rmw_inst_reg_bits(OMAP4430_ISOOVR_EXTEND_MASK,
0, OMAP4430_PRM_PARTITION,
OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
}
- omap2_gpio_restore_edge_wakeup();
-
if (mpu_next_state < PWRDM_POWER_INACTIVE) {
omap_vc_set_auto_trans(mpu_voltdm,
OMAP_VC_CHANNEL_AUTO_TRANSITION_DISABLE);
omap_sr_enable(mpu_voltdm);
}
+ omap2_gpio_resume_after_idle(omap4_device_next_state_off());
+
+abort_gpio:
return;
}