diff options
author | NeilBrown <neilb@suse.de> | 2013-01-20 15:00:34 +1100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> | 2013-03-09 14:51:26 +0100 |
commit | fdf361cfa903abc1de9acec0e04cb28631d7d514 (patch) | |
tree | 6934be95ff3dbea705b1a104cc812c4d3a722cb9 | |
parent | 79a9309b564b8ce36ae4f465a076004c5a42b278 (diff) | |
download | kernel_goldelico_gta04-fdf361cfa903abc1de9acec0e04cb28631d7d514.zip kernel_goldelico_gta04-fdf361cfa903abc1de9acec0e04cb28631d7d514.tar.gz kernel_goldelico_gta04-fdf361cfa903abc1de9acec0e04cb28631d7d514.tar.bz2 |
OMAP:HACK - don't let CORE go to off-mode the first time.
If CORE and USBHOST both go the off-mode the first time
USBHOST does, then my device will not resume.
However if we let USBHOST go to off-mode and back will CORE is
in RETENSION at most, then subsequent off-mode transitions are
not a problem.
So for RETENTION for the first transition, and OFF for the next.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 3a904de..e1ad337 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -376,6 +376,14 @@ static int omap3_pm_suspend(void) pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); /* Set ones wanted by suspend */ list_for_each_entry(pwrst, &pwrst_list, node) { + if (strcmp(pwrst->pwrdm->name, "core_pwrdm") == 0) { + static int times = 0; + times++; + if (times == 1) + pwrst->next_state = PWRDM_POWER_RET; + if (times == 2) + pwrst->next_state = PWRDM_POWER_OFF; + } if (omap_set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) goto restore; if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) |