From 68f12b8b114dead5f585b7a4b36690f60171795a Mon Sep 17 00:00:00 2001 From: zhanghao Date: Mon, 19 Dec 2011 10:09:46 +0800 Subject: [PATCH] ION : Add ION to td8801\a22\phonesdk --- arch/arm/configs/rk29_a22_defconfig | 2 ++ arch/arm/configs/rk29_phonesdk_defconfig | 3 ++- arch/arm/configs/rk29_td8801_v2_defconfig | 3 +++ arch/arm/mach-rk29/board-rk29-a22.c | 26 ++++++++++++++++++++++ arch/arm/mach-rk29/board-rk29-phonesdk.c | 27 +++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/rk29_a22_defconfig b/arch/arm/configs/rk29_a22_defconfig index 46a3a9890654..f2c1803f802c 100755 --- a/arch/arm/configs/rk29_a22_defconfig +++ b/arch/arm/configs/rk29_a22_defconfig @@ -272,6 +272,8 @@ CONFIG_SOC_CAMERA=y CONFIG_SOC_CAMERA_MT9T111=y CONFIG_SOC_CAMERA_GC0309=y CONFIG_VIDEO_RK29=y +CONFIG_ION=y +CONFIG_ION_ROCKCHIP=y CONFIG_FB=y CONFIG_FB_RK29=y CONFIG_FB_WORK_IPP=y diff --git a/arch/arm/configs/rk29_phonesdk_defconfig b/arch/arm/configs/rk29_phonesdk_defconfig index 61d129b9a4c6..8f4d09c73519 100755 --- a/arch/arm/configs/rk29_phonesdk_defconfig +++ b/arch/arm/configs/rk29_phonesdk_defconfig @@ -1641,7 +1641,8 @@ CONFIG_RADIO_ADAPTERS=y # Graphics support # # CONFIG_DRM is not set -# CONFIG_ION is not set +CONFIG_ION=y +CONFIG_ION_ROCKCHIP=y # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y diff --git a/arch/arm/configs/rk29_td8801_v2_defconfig b/arch/arm/configs/rk29_td8801_v2_defconfig index 4c9b0242d81e..733eb1191a43 100755 --- a/arch/arm/configs/rk29_td8801_v2_defconfig +++ b/arch/arm/configs/rk29_td8801_v2_defconfig @@ -1393,6 +1393,9 @@ CONFIG_SMS_SIANO_MDTV=m # # Graphics support # +# CONFIG_DRM is not set +CONFIG_ION=y +CONFIG_ION_ROCKCHIP=y # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index 0accc992cf11..62918bbb4e6e 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -459,6 +459,29 @@ static struct platform_device rk29_v4l2_output_devce = { }; /*HANNSTAR_P1003 touch*/ + +#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 #if defined (CONFIG_HANNSTAR_P1003) #define TOUCH_RESET_PIN RK29_PIN6_PC3 #define TOUCH_INT_PIN RK29_PIN4_PD5 @@ -3188,6 +3211,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, diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index ff58befc20e2..cef8a03d2a93 100755 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -437,6 +437,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 @@ -3156,6 +3180,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, -- 2.34.1