diff options
author | Rajendra Nayak <rnayak@ti.com> | 2008-09-26 08:19:56 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-11 17:42:25 -0500 |
commit | 61255ab9e853ddbbe092328c30921d2ba9434134 (patch) | |
tree | fb98af6ee37546e36ebce77da40d4a6fd99aee78 /arch/arm/mach-omap2/pm34xx.c | |
parent | 57f277b0122722ffa1de1b53aceb70646ce9a8e1 (diff) |
OMAP3: PM: MPU off-mode support
Adds a 'save_state' option when calling into SRAM idle function
and adds some minor cleanups of SRAM asm code.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 8b5bf91dc070..9fb087607e76 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <plat/powerdomain.h> | 28 | #include <plat/powerdomain.h> |
29 | #include <plat/control.h> | 29 | #include <plat/control.h> |
30 | #include <plat/serial.h> | 30 | #include <plat/serial.h> |
31 | #include <plat/sdrc.h> | ||
31 | 32 | ||
32 | #include <asm/tlbflush.h> | 33 | #include <asm/tlbflush.h> |
33 | 34 | ||
@@ -223,6 +224,9 @@ static void omap_sram_idle(void) | |||
223 | /* No need to save context */ | 224 | /* No need to save context */ |
224 | save_state = 0; | 225 | save_state = 0; |
225 | break; | 226 | break; |
227 | case PWRDM_POWER_OFF: | ||
228 | save_state = 3; | ||
229 | break; | ||
226 | default: | 230 | default: |
227 | /* Invalid state */ | 231 | /* Invalid state */ |
228 | printk(KERN_ERR "Invalid mpu state in sram_idle\n"); | 232 | printk(KERN_ERR "Invalid mpu state in sram_idle\n"); |
@@ -248,7 +252,12 @@ static void omap_sram_idle(void) | |||
248 | prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); | 252 | prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); |
249 | } | 253 | } |
250 | 254 | ||
251 | _omap_sram_idle(NULL, save_state); | 255 | /* |
256 | * omap3_arm_context is the location where ARM registers | ||
257 | * get saved. The restore path then reads from this | ||
258 | * location and restores them back. | ||
259 | */ | ||
260 | _omap_sram_idle(omap3_arm_context, save_state); | ||
252 | cpu_init(); | 261 | cpu_init(); |
253 | 262 | ||
254 | /* Restore table entry modified during MMU restoration */ | 263 | /* Restore table entry modified during MMU restoration */ |