msm: pm2: Define a variable to update the power collapse status
After coming out of power collapse, QGIC gets reset and there
is no way to restore core1's previous SGI/PPI configuration
before it actually lost the power.
Linux hotplug software uses SGI to wakeup the core1 irrespective of
normal hotplug or power collapse. Since SGI's wont't
work after coming out of power collapse use SPI instead of SGI.
The kernel hotplug software differentiates between waking up the
core1 in normal hotplug vs the power collapse.
Define variable to represent the apps power collapse status sothat
hotplug software can rely on this to send SPI/SGI.
Clear this power collapse variable, once hotplug sw wakes up the core1.
Change-Id: Iba308356fc4a75ee7f9de773b7a87cd0bc40f291
Signed-off-by: Anji jonnala <anjir@codeaurora.org>
diff --git a/arch/arm/mach-msm/pm2.c b/arch/arm/mach-msm/pm2.c
index 2691836..c66c809 100644
--- a/arch/arm/mach-msm/pm2.c
+++ b/arch/arm/mach-msm/pm2.c
@@ -1111,6 +1111,8 @@
#endif
collapsed = msm_pm_collapse();
+ if (collapsed)
+ power_collapsed = 1;
#ifdef CONFIG_CACHE_L2X0
l2x0_resume(collapsed);