aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 841ba19d64a6..36c55547137c 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -48,6 +48,7 @@
48#include "prm3xxx.h" 48#include "prm3xxx.h"
49#include "pm.h" 49#include "pm.h"
50#include "sdrc.h" 50#include "sdrc.h"
51#include "omap-secure.h"
51#include "sram.h" 52#include "sram.h"
52#include "control.h" 53#include "control.h"
53#include "vc.h" 54#include "vc.h"
@@ -66,7 +67,6 @@ struct power_state {
66 67
67static LIST_HEAD(pwrst_list); 68static LIST_HEAD(pwrst_list);
68 69
69static int (*_omap_save_secure_sram)(u32 *addr);
70void (*omap3_do_wfi_sram)(void); 70void (*omap3_do_wfi_sram)(void);
71 71
72static struct powerdomain *mpu_pwrdm, *neon_pwrdm; 72static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
@@ -121,8 +121,8 @@ static void omap3_save_secure_ram_context(void)
121 * will hang the system. 121 * will hang the system.
122 */ 122 */
123 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); 123 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
124 ret = _omap_save_secure_sram((u32 *)(unsigned long) 124 ret = omap3_save_secure_ram(omap3_secure_ram_storage,
125 __pa(omap3_secure_ram_storage)); 125 OMAP3_SAVE_SECURE_RAM_SZ);
126 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); 126 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
127 /* Following is for error tracking, it should not happen */ 127 /* Following is for error tracking, it should not happen */
128 if (ret) { 128 if (ret) {
@@ -434,15 +434,10 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
434 * 434 *
435 * The minimum set of functions is pushed to SRAM for execution: 435 * The minimum set of functions is pushed to SRAM for execution:
436 * - omap3_do_wfi for erratum i581 WA, 436 * - omap3_do_wfi for erratum i581 WA,
437 * - save_secure_ram_context for security extensions.
438 */ 437 */
439void omap_push_sram_idle(void) 438void omap_push_sram_idle(void)
440{ 439{
441 omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz); 440 omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz);
442
443 if (omap_type() != OMAP2_DEVICE_TYPE_GP)
444 _omap_save_secure_sram = omap_sram_push(save_secure_ram_context,
445 save_secure_ram_context_sz);
446} 441}
447 442
448static void __init pm_errata_configure(void) 443static void __init pm_errata_configure(void)
@@ -553,7 +548,7 @@ int __init omap3_pm_init(void)
553 clkdm_add_wkdep(neon_clkdm, mpu_clkdm); 548 clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
554 if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 549 if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
555 omap3_secure_ram_storage = 550 omap3_secure_ram_storage =
556 kmalloc(0x803F, GFP_KERNEL); 551 kmalloc(OMAP3_SAVE_SECURE_RAM_SZ, GFP_KERNEL);
557 if (!omap3_secure_ram_storage) 552 if (!omap3_secure_ram_storage)
558 pr_err("Memory allocation failed when allocating for secure sram context\n"); 553 pr_err("Memory allocation failed when allocating for secure sram context\n");
559 554