From: zhanghao Date: Sat, 17 Dec 2011 06:48:06 +0000 (+0800) Subject: td8801 : add ion X-Git-Tag: firefly_0821_release~9710^2~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b2a129166b606beb803509fc4e7ed32b51711ac;p=firefly-linux-kernel-4.4.55.git td8801 : add ion --- diff --git a/arch/arm/mach-rk29/board-rk29-td8801_v2.c b/arch/arm/mach-rk29/board-rk29-td8801_v2.c index 342bb8a9398c..e9beeb10a60a 100755 --- a/arch/arm/mach-rk29/board-rk29-td8801_v2.c +++ b/arch/arm/mach-rk29/board-rk29-td8801_v2.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -429,6 +430,30 @@ static struct platform_device rk29_v4l2_output_devce = { .name = "rk29_vout", }; +#ifdef CONFIG_ION +static struct ion_platform_data rk29_ion_pdata = { + .nr = 1, + .heaps = { + { + .type = ION_HEAP_TYPE_CARVEOUT, + .id = 0, + .name = "ui", + .base = PMEM_UI_BASE, + .size = PMEM_UI_SIZE, + } + }, +}; + +static struct platform_device rk29_ion_device = { + .name = "ion-rockchip", + .id = 0, + .dev = { + .platform_data = &rk29_ion_pdata, + }, +}; +#endif + + /* HANNSTAR_P1003 touch I2C */ #if defined (CONFIG_HANNSTAR_P1003) #define TOUCH_RESET_PIN RK29_PIN6_PC3 @@ -3141,6 +3166,9 @@ static struct platform_device *devices[] __initdata = { #endif &rk29_soc_camera_pdrv_1, &android_pmem_cam_device, +#endif +#ifdef CONFIG_ION + &rk29_ion_device, #endif &android_pmem_device, &rk29_vpu_mem_device,