msm: Pull cache dumping out of the board file

The cache dumping device belongs in the devices file with
the rest of the platorm devices. Pull it out and add appropriate
definitions in headers for access. Also remove CONFIG_MSM_CACHE_DUMP
macros around the device and code since platform device matching
will do the proper thing if CONFIG_MSM_CACHE_DUMP is not defined.

Change-Id: I713378b36c166f611e723e4b1ee0d7bdd8bf6497
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8960.c b/arch/arm/mach-msm/board-8960.c
index ade6529..a3afdb0 100644
--- a/arch/arm/mach-msm/board-8960.c
+++ b/arch/arm/mach-msm/board-8960.c
@@ -673,21 +673,6 @@
 	msm8960_mdp_writeback(msm8960_reserve_table);
 }
 
-#if defined(CONFIG_MSM_CACHE_DUMP)
-static struct msm_cache_dump_platform_data msm8960_cache_dump_pdata = {
-	.l2_size = L2_BUFFER_SIZE,
-};
-
-static struct platform_device msm8960_cache_dump_device = {
-	.name           = "msm_cache_dump",
-	.id             = -1,
-	.dev            = {
-		.platform_data = &msm8960_cache_dump_pdata,
-	},
-};
-
-#endif
-
 static void __init reserve_cache_dump_memory(void)
 {
 #ifdef CONFIG_MSM_CACHE_DUMP
@@ -2566,9 +2551,7 @@
 	&msm8960_cpu_idle_device,
 	&msm8960_msm_gov_device,
 	&msm8960_device_cache_erp,
-#ifdef CONFIG_MSM_CACHE_DUMP
 	&msm8960_cache_dump_device,
-#endif
 	&msm8960_iommu_domain_device,
 	&msm_tsens_device,
 };
diff --git a/arch/arm/mach-msm/board-8960.h b/arch/arm/mach-msm/board-8960.h
index 6a4c92e..925c5b4 100644
--- a/arch/arm/mach-msm/board-8960.h
+++ b/arch/arm/mach-msm/board-8960.h
@@ -21,6 +21,7 @@
 #include <mach/rpm-regulator.h>
 #include <mach/msm_memtypes.h>
 #include <mach/msm_rtb.h>
+#include <mach/msm_cache_dump.h>
 
 /* Macros assume PMIC GPIOs and MPPs start at 1 */
 #define PM8921_GPIO_BASE		NR_GPIO_IRQS
@@ -95,3 +96,4 @@
 #define MSM_8960_GSBI10_QUP_I2C_BUS_ID 10
 
 extern struct msm_rtb_platform_data msm8960_rtb_pdata;
+extern struct msm_cache_dump_platform_data msm8960_cache_dump_pdata;
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 42a2820..ef5881f 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -33,6 +33,7 @@
 #include <mach/msm_smd.h>
 #include <mach/msm_dcvs.h>
 #include <mach/msm_rtb.h>
+#include <mach/msm_cache_dump.h>
 #include <sound/msm-dai-q6.h>
 #include <sound/apr_audio.h>
 #include <mach/msm_tsif.h>
@@ -3619,3 +3620,15 @@
 		.platform_data = &msm8960_rtb_pdata,
 	},
 };
+
+struct msm_cache_dump_platform_data msm8960_cache_dump_pdata = {
+	.l2_size = L2_BUFFER_SIZE,
+};
+
+struct platform_device msm8960_cache_dump_device = {
+	.name           = "msm_cache_dump",
+	.id             = -1,
+	.dev            = {
+		.platform_data = &msm8960_cache_dump_pdata,
+	},
+};
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index e86c226..6a56c04 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -389,3 +389,5 @@
 extern struct platform_device msm8960_rtb_device;
 extern struct platform_device msm8930_rtb_device;
 extern struct platform_device apq8064_rtb_device;
+
+extern struct platform_device msm8960_cache_dump_device;