msm: pm-8x60: Save and restore the GIC_CPU_CTRL during power collapse
9615 runs in secure mode and has different QGIC settings. Instead of
writing 0x1, read the GIC_CPU_CTRL register before power-collapse and
restore the value during resume.
This makes sure that power-collapse continues to work on all targets.
Change-Id: I094c4605b89559d777587394ff9f479640459e0a
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm-8x60.c b/arch/arm/mach-msm/pm-8x60.c
index b3c6d1e..ad235de 100644
--- a/arch/arm/mach-msm/pm-8x60.c
+++ b/arch/arm/mach-msm/pm-8x60.c
@@ -655,6 +655,10 @@
void *entry;
bool collapsed = 0;
int ret;
+ unsigned int saved_gic_cpu_ctrl;
+
+ saved_gic_cpu_ctrl = readl_relaxed(MSM_QGIC_CPU_BASE + GIC_CPU_CTRL);
+ mb();
if (MSM_PM_DEBUG_POWER_COLLAPSE & msm_pm_debug_mask)
pr_info("CPU%u: %s: notify_rpm %d\n",
@@ -686,7 +690,9 @@
#endif
cpu_init();
writel(0xF0, MSM_QGIC_CPU_BASE + GIC_CPU_PRIMASK);
- writel(1, MSM_QGIC_CPU_BASE + GIC_CPU_CTRL);
+ writel_relaxed(saved_gic_cpu_ctrl,
+ MSM_QGIC_CPU_BASE + GIC_CPU_CTRL);
+ mb();
local_fiq_enable();
}