msm: pil: Add support for proxy unvoting via SMP2P interrupt

Add support to use an SMP2P interrupt to proxy unvote. Do this
without affecting existing subsystems that may not use SMP2P. If
a subsystem does not use SMP2P, keep current implementation of
performing the unvote 10 seconds after it is brought out of reset.
If the subsystem uses SMP2P to indicate clock/power ready, then
ignore the proxy timeout value and unvote only when the interrupt
occurs. As before, if an error occurs while booting, perform the
unvote immediately after the peripheral is shutdown.

Change-Id: I62b1425cb8a536f455b6e110beabcbd59fdd5479
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
diff --git a/arch/arm/mach-msm/peripheral-loader.h b/arch/arm/mach-msm/peripheral-loader.h
index c1a4167..ff10fe5 100644
--- a/arch/arm/mach-msm/peripheral-loader.h
+++ b/arch/arm/mach-msm/peripheral-loader.h
@@ -25,6 +25,8 @@
  * @proxy_timeout: delay in ms until proxy vote is removed
  * @flags: bitfield for image flags
  * @priv: DON'T USE - internal only
+ * @proxy_unvote_irq: IRQ to trigger a proxy unvote. proxy_timeout
+ * is ignored if this is set.
  */
 struct pil_desc {
 	const char *name;
@@ -35,6 +37,7 @@
 	unsigned long flags;
 #define PIL_SKIP_ENTRY_CHECK	BIT(0)
 	struct pil_priv *priv;
+	unsigned int proxy_unvote_irq;
 };
 
 /**