aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 4001325f90fb..63a1dd708d80 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -56,6 +56,7 @@
56#include "omap4-sar-layout.h" 56#include "omap4-sar-layout.h"
57#include "pm.h" 57#include "pm.h"
58#include "prcm_mpu44xx.h" 58#include "prcm_mpu44xx.h"
59#include "prcm_mpu54xx.h"
59#include "prminst44xx.h" 60#include "prminst44xx.h"
60#include "prcm44xx.h" 61#include "prcm44xx.h"
61#include "prm44xx.h" 62#include "prm44xx.h"
@@ -89,6 +90,7 @@ struct cpu_pm_ops {
89static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); 90static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info);
90static struct powerdomain *mpuss_pd; 91static struct powerdomain *mpuss_pd;
91static void __iomem *sar_base; 92static void __iomem *sar_base;
93static u32 cpu_context_offset;
92 94
93static int default_finish_suspend(unsigned long cpu_state) 95static int default_finish_suspend(unsigned long cpu_state)
94{ 96{
@@ -161,14 +163,14 @@ static inline void cpu_clear_prev_logic_pwrst(unsigned int cpu_id)
161 163
162 if (cpu_id) { 164 if (cpu_id) {
163 reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU1_INST, 165 reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU1_INST,
164 OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET); 166 cpu_context_offset);
165 omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU1_INST, 167 omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU1_INST,
166 OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET); 168 cpu_context_offset);
167 } else { 169 } else {
168 reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU0_INST, 170 reg = omap4_prcm_mpu_read_inst_reg(OMAP4430_PRCM_MPU_CPU0_INST,
169 OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET); 171 cpu_context_offset);
170 omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU0_INST, 172 omap4_prcm_mpu_write_inst_reg(reg, OMAP4430_PRCM_MPU_CPU0_INST,
171 OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET); 173 cpu_context_offset);
172 } 174 }
173} 175}
174 176
@@ -392,6 +394,9 @@ int __init omap4_mpuss_init(void)
392 omap_pm_ops.finish_suspend = omap4_finish_suspend; 394 omap_pm_ops.finish_suspend = omap4_finish_suspend;
393 omap_pm_ops.resume = omap4_cpu_resume; 395 omap_pm_ops.resume = omap4_cpu_resume;
394 omap_pm_ops.scu_prepare = scu_pwrst_prepare; 396 omap_pm_ops.scu_prepare = scu_pwrst_prepare;
397 cpu_context_offset = OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET;
398 } else if (soc_is_omap54xx() || soc_is_dra7xx()) {
399 cpu_context_offset = OMAP54XX_RM_CPU0_CPU0_CONTEXT_OFFSET;
395 } 400 }
396 401
397 return 0; 402 return 0;