msm: pil-q6v4: Split out modem and lpass drivers

Separate the pil-q6v4 driver into subsystem specific drivers for
lpass and modem respectively. This is necessary so that we can
move the subsystem restart code for the lpass and modem
subsystems into their respective pil drivers in a later patch.

Change-Id: Id5e899b5c9cc7d1a3529d1a5f0ff24798f213f00
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/pil-q6v4.h b/arch/arm/mach-msm/pil-q6v4.h
index b0b97d0..d280d84 100644
--- a/arch/arm/mach-msm/pil-q6v4.h
+++ b/arch/arm/mach-msm/pil-q6v4.h
@@ -12,6 +12,8 @@
 #ifndef __MSM_PIL_Q6V4_H
 #define __MSM_PIL_Q6V4_H
 
+#include "peripheral-loader.h"
+
 struct pil_q6v4_pdata {
 	const unsigned long strap_tcm_base;
 	const unsigned long strap_ahb_upper;
@@ -23,4 +25,50 @@
 	const unsigned pas_id;
 	int bus_port;
 };
+
+struct clk;
+struct pil_device;
+struct regulator;
+
+/**
+ * struct q6v4_data - Q6 processor
+ */
+struct q6v4_data {
+	void __iomem *base;
+	unsigned long start_addr;
+	unsigned long strap_tcm_base;
+	unsigned long strap_ahb_upper;
+	unsigned long strap_ahb_lower;
+	void __iomem *aclk_reg;
+	void __iomem *jtag_clk_reg;
+	unsigned pas_id;
+	int bus_port;
+
+	struct regulator *vreg;
+	struct regulator *pll_supply;
+	bool vreg_enabled;
+	struct clk *xo;
+
+	struct pil_device *pil;
+	struct pil_desc desc;
+};
+
+#define pil_to_q6v4_data(p) container_of(p, struct q6v4_data, desc)
+
+extern int pil_q6v4_init_image(struct pil_desc *pil, const u8 *metadata,
+		size_t size);
+extern int pil_q6v4_make_proxy_votes(struct pil_desc *pil);
+extern void pil_q6v4_remove_proxy_votes(struct pil_desc *pil);
+extern int pil_q6v4_power_up(struct q6v4_data *drv);
+extern void pil_q6v4_power_down(struct q6v4_data *drv);
+extern int pil_q6v4_boot(struct pil_desc *pil);
+extern int pil_q6v4_shutdown(struct pil_desc *pil);
+
+extern int pil_q6v4_init_image_trusted(struct pil_desc *pil,
+		const u8 *metadata, size_t size);
+extern int pil_q6v4_boot_trusted(struct pil_desc *pil);
+extern int pil_q6v4_shutdown_trusted(struct pil_desc *pil);
+extern void __devinit
+pil_q6v4_init(struct q6v4_data *drv, const struct pil_q6v4_pdata *p);
+
 #endif