summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFang Hui <b31070@freescale.com>2013-08-13 16:08:40 +0800
committerFang Hui <b31070@freescale.com>2013-08-13 17:41:30 +0800
commit8db7aa887c632e151eba5ef8a22a7d7e266f8388 (patch)
treee31ea38027a424824fad56ecb0773962efc9b487
parent9aa3f3da7b6ba96347b67dbe7eafa1a16b7085aa (diff)
ENGR00275011 - [EVK_6SL]: enable camera
enable ion device for evk_6sl, so takepicture can use it's memory Signed-off-by: Fang Hui <b31070@freescale.com>
-rw-r--r--arch/arm/mach-mx6/board-mx6sl_evk.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/board-mx6sl_evk.c b/arch/arm/mach-mx6/board-mx6sl_evk.c
index adc8b463b78b..db29587e8023 100644
--- a/arch/arm/mach-mx6/board-mx6sl_evk.c
+++ b/arch/arm/mach-mx6/board-mx6sl_evk.c
@@ -53,6 +53,7 @@
#include <sound/wm8962.h>
#include <sound/pcm.h>
#include <linux/power/sabresd_battery.h>
+#include <linux/ion.h>
#include <mach/common.h>
#include <mach/hardware.h>
@@ -92,6 +93,19 @@ static int csi_enabled;
#define SXSDMAN_BLUETOOTH_ENABLE
+static struct ion_platform_data imx_ion_data = {
+ .nr = 1,
+ .heaps = {
+ {
+ .id = 0,
+ .type = ION_HEAP_TYPE_CARVEOUT,
+ .name = "vpu_ion",
+ .size = SZ_16M,
+ .cacheable = 1,
+ },
+ },
+};
+
static iomux_v3_cfg_t mx6sl_brd_csi_enable_pads[] = {
MX6SL_PAD_EPDC_GDRL__CSI_MCLK,
MX6SL_PAD_EPDC_SDCE3__I2C3_SDA,
@@ -1646,6 +1660,11 @@ static void __init mx6_evk_init(void)
platform_device_register(&evk_max8903_charger_1);
pm_power_off = mx6_snvs_poweroff;
imx6q_add_pm_imx(0, &mx6sl_evk_pm_data);
+
+ if (imx_ion_data.heaps[0].size)
+ platform_device_register_resndata(NULL, "ion-mxc", 0, NULL, 0, \
+ &imx_ion_data, sizeof(imx_ion_data) + sizeof(struct ion_platform_heap));
+
}
extern void __iomem *twd_base;
@@ -1678,6 +1697,14 @@ static void __init mx6_evk_reserve(void)
imx6q_gpu_pdata.reserved_mem_base = phys;
}
#endif
+
+#if defined(CONFIG_ION)
+ if (imx_ion_data.heaps[0].size) {
+ phys = memblock_alloc(imx_ion_data.heaps[0].size, SZ_4K);
+ memblock_remove(phys, imx_ion_data.heaps[0].size);
+ imx_ion_data.heaps[0].base = phys;
+ }
+#endif
}
MACHINE_START(MX6SL_EVK, "Freescale i.MX 6SoloLite EVK Board")