Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172741
b: refs/heads/master
c: 9d97140
h: refs/heads/master
i:
  172739: 83c82ad
v: v3
  • Loading branch information
Tero Kristo authored and Kevin Hilman committed Nov 11, 2009
1 parent 4fefa7b commit 54ad8c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27d59a4a2def42307349079f2e3538d96934c379
refs/heads/master: 9d97140bd0c5da55f174a81dafd2bbef135f5748
19 changes: 17 additions & 2 deletions trunk/arch/arm/mach-omap2/pm34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ static void omap3_core_restore_context(void)
omap_dma_global_context_restore();
}

/*
* FIXME: This function should be called before entering off-mode after
* OMAP3 secure services have been accessed. Currently it is only called
* once during boot sequence, but this works as we are not using secure
* services.
*/
static void omap3_save_secure_ram_context(u32 target_mpu_state)
{
u32 ret;
Expand Down Expand Up @@ -337,7 +343,6 @@ static void omap_sram_idle(void)
if (core_next_state == PWRDM_POWER_OFF) {
omap3_core_save_context();
omap3_prcm_save_context();
omap3_save_secure_ram_context(mpu_next_state);
}
/* Enable IO-PAD wakeup */
prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN);
Expand Down Expand Up @@ -999,9 +1004,19 @@ static int __init omap3_pm_init(void)
if (!omap3_secure_ram_storage)
printk(KERN_ERR "Memory allocation failed when"
"allocating for secure sram context\n");

local_irq_disable();
local_fiq_disable();

omap_dma_global_context_save();
omap3_save_secure_ram_context(PWRDM_POWER_ON);
omap_dma_global_context_restore();

local_irq_enable();
local_fiq_enable();
}
omap3_save_scratchpad_contents();

omap3_save_scratchpad_contents();
err1:
return ret;
err2:
Expand Down

0 comments on commit 54ad8c2

Please sign in to comment.