devices-xxxx : ION check for video driver.

Add variable to check if ion heaps are avaliable for these targets
7x30,8660,8960, If ion heap is avaliable then allocate the memory
from ion heap else use the pmem heap.

Change-Id: I7811d70ec48bc89c61bfd92d1d6b9762facd2455
Signed-off-by: Deepak Kotur <dkotur@codeaurora.org>
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index b737b116..5d0a13c 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -537,7 +537,12 @@
 #ifdef CONFIG_MSM_BUS_SCALING
 	.vidc_bus_client_pdata = &vidc_bus_client_data,
 #endif
-	.memtype = MEMTYPE_EBI1
+	.memtype = MEMTYPE_EBI1,
+#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
+	.enable_ion = 1,
+#else
+	.enable_ion = 0,
+#endif
 };
 
 struct platform_device msm_device_vidc = {
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
index b76a844..2a39e3c 100644
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ b/arch/arm/mach-msm/devices-msm7x30.c
@@ -789,7 +789,8 @@
 };
 
 struct msm_vidc_platform_data vidc_platform_data = {
-	.memtype = MEMTYPE_EBI0
+	.memtype = MEMTYPE_EBI0,
+	.enable_ion = 0
 };
 
 struct platform_device msm_device_vidc_720p = {
diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c
index 4458adf..52c62fd 100644
--- a/arch/arm/mach-msm/devices-msm8x60.c
+++ b/arch/arm/mach-msm/devices-msm8x60.c
@@ -2150,7 +2150,12 @@
 #ifdef CONFIG_MSM_BUS_SCALING
 	.vidc_bus_client_pdata = &vidc_bus_client_data,
 #endif
-	.memtype = MEMTYPE_SMI_KERNEL
+	.memtype = MEMTYPE_SMI_KERNEL,
+#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
+	.enable_ion = 1,
+#else
+	.enable_ion = 0,
+#endif
 };
 
 struct platform_device msm_device_vidc = {
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index e7f156e..2116ee7 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -404,6 +404,7 @@
 
 struct msm_vidc_platform_data {
 	int memtype;
+	u32 enable_ion;
 #ifdef CONFIG_MSM_BUS_SCALING
 	struct msm_bus_scale_pdata *vidc_bus_client_pdata;
 #endif