diff options
author | Krishna Reddy <vdumpa@nvidia.com> | 2011-12-19 18:50:55 -0800 |
---|---|---|
committer | Krishna Reddy <vdumpa@nvidia.com> | 2011-12-29 17:12:10 -0800 |
commit | 16663701396134081324bbaf64d611d2e7682dd7 (patch) | |
tree | cc26265c3ea2609b48e6fc1e0b0c827917f768ff /arch/arm/mach-tegra/board-cardhu-panel.c | |
parent | 3b1a4102d33699c713d32aea8b1621ee53e16819 (diff) |
arm: tegra: cardhu: Add Ion device and it resouces.
Add Ion device and its resources.
Change-Id: I77718dda4acc62074dc859a95441ef04181ae4a7
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/71114
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index 0964202196f9..da281ecff806 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -19,6 +19,8 @@ */ #include <linux/delay.h> +#include <linux/ion.h> +#include <linux/tegra_ion.h> #include <linux/gpio.h> #include <linux/regulator/consumer.h> #include <linux/resource.h> @@ -1031,10 +1033,50 @@ static struct platform_device cardhu_nvmap_device = { }; #endif +#if defined(CONFIG_ION_TEGRA) +static struct ion_platform_data tegra_ion_data = { + .nr = 3, + .heaps = { + { + .type = ION_HEAP_TYPE_CARVEOUT, + .id = TEGRA_ION_HEAP_CARVEOUT, + .name = "carveout", + .base = 0, + .size = 0, + }, + { + .type = ION_HEAP_TYPE_CARVEOUT, + .id = TEGRA_ION_HEAP_IRAM, + .name = "iram", + .base = TEGRA_IRAM_BASE + TEGRA_RESET_HANDLER_SIZE, + .size = TEGRA_IRAM_SIZE - TEGRA_RESET_HANDLER_SIZE, + }, + { + .type = ION_HEAP_TYPE_CARVEOUT, + .id = TEGRA_ION_HEAP_VPR, + .name = "vpr", + .base = 0, + .size = 0, + }, + }, +}; + +static struct platform_device tegra_ion_device = { + .name = "ion-tegra", + .id = -1, + .dev = { + .platform_data = &tegra_ion_data, + }, +}; +#endif + static struct platform_device *cardhu_gfx_devices[] __initdata = { #if defined(CONFIG_TEGRA_NVMAP) &cardhu_nvmap_device, #endif +#if defined(CONFIG_ION_TEGRA) + &tegra_ion_device, +#endif #ifdef CONFIG_TEGRA_GRHOST &tegra_grhost_device, #endif @@ -1081,6 +1123,11 @@ int __init cardhu_panel_init(void) cardhu_carveouts[1].size = tegra_carveout_size; #endif +#if defined(CONFIG_ION_TEGRA) + tegra_ion_data.heaps[0].base = tegra_carveout_start; + tegra_ion_data.heaps[0].size = tegra_carveout_size; +#endif + if (board_info.board_id == BOARD_E1291 && ((board_info.sku & SKU_TOUCHSCREEN_MECH_FIX) == 0)) { /* use 55Hz panel timings to reduce noise on sensitive touch */ |