diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-02-06 09:09:07 -0500 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-09-08 12:38:40 -0400 |
commit | a89726d3b4cb81b033e34cc55974a33dab3279da (patch) | |
tree | e54382822612a6f35f8f324bd01543bbc56d3f46 | |
parent | dbbe9770d11284322db289c6ec83e8911e7a8f89 (diff) |
ARM: OMAP5 / DRA7: PM: Update CPU context register offset
On OMAP5, RM_CPUi_CPUi_CONTEXT offset has changed. Update the code
so that same code works for OMAP4+ devices. DRA7 and OMAP5 have the same
context offset as well.
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[rnayak@ti.com: for DRA7]
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
[nm@ti.com: rebase, split/merge etc..]
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r-- | arch/arm/mach-omap2/omap-mpuss-lowpower.c | 13 |
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 { | |||
89 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); | 90 | static DEFINE_PER_CPU(struct omap4_cpu_pm_info, omap4_pm_info); |
90 | static struct powerdomain *mpuss_pd; | 91 | static struct powerdomain *mpuss_pd; |
91 | static void __iomem *sar_base; | 92 | static void __iomem *sar_base; |
93 | static u32 cpu_context_offset; | ||
92 | 94 | ||
93 | static int default_finish_suspend(unsigned long cpu_state) | 95 | static 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; |