msm: pil-8660: Break off modem code into platform driver
Create a platform driver to manage the modem instead of having a
module that exists for any 8660 device. This allows us to
add platform devices when the modem really exists and not add it
when there isn't a modem preset (e.g. APQ devices).
Change-Id: I7940c6430ded009dd8ea2cae9ffa514f5495d3f3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c
index f1f6e64..8f1709b 100644
--- a/arch/arm/mach-msm/devices-msm8x60.c
+++ b/arch/arm/mach-msm/devices-msm8x60.c
@@ -194,6 +194,23 @@
.resource = msm_8660_q6_resources,
};
+#define MSM_MSS_REGS_PHYS 0x10200000
+
+static struct resource msm_8660_modem_resources[] = {
+ {
+ .start = MSM_MSS_REGS_PHYS,
+ .end = MSM_MSS_REGS_PHYS + SZ_256 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device msm_pil_modem = {
+ .name = "pil_modem",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(msm_8660_modem_resources),
+ .resource = msm_8660_modem_resources,
+};
+
struct platform_device msm_pil_tzapps = {
.name = "pil_tzapps",
.id = -1,