summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu-panel.c
diff options
context:
space:
mode:
authorHiroshi DOYU <hdoyu@nvidia.com>2011-12-30 07:41:38 +0200
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-12 09:15:59 -0800
commit546729d2e7a9dbb55aa4d5f6ba8ad59fa9a79361 (patch)
treee2b119c1d737fe1f97fcc39d50f56dd305d72cd1 /arch/arm/mach-tegra/board-cardhu-panel.c
parent645171a16894e91f375d21436c29617d410b9d0e (diff)
arm: tegra: cardhu: Add iommu heap entry for SMMU
This registers iommu_heap to be used by Ion memory manager. If iommu_heap isn't supported with CONFIG_ION_IOMMU disabled, this entry should be ignored. Change-Id: Iabe072369eecdec4ca25396127c3720915b2eefd Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/72830 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index da281ecff806..b64a453f9750 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -35,6 +35,7 @@
#include <mach/iomap.h>
#include <mach/dc.h>
#include <mach/fb.h>
+#include <mach/smmu.h>
#include "board.h"
#include "board-cardhu.h"
@@ -1034,8 +1035,17 @@ static struct platform_device cardhu_nvmap_device = {
#endif
#if defined(CONFIG_ION_TEGRA)
+
+static struct platform_device tegra_iommu_device = {
+ .name = "tegra_iommu_device",
+ .id = -1,
+ .dev = {
+ .platform_data = (void *)((1 << HWGRP_COUNT) - 1),
+ },
+};
+
static struct ion_platform_data tegra_ion_data = {
- .nr = 3,
+ .nr = 4,
.heaps = {
{
.type = ION_HEAP_TYPE_CARVEOUT,
@@ -1058,6 +1068,14 @@ static struct ion_platform_data tegra_ion_data = {
.base = 0,
.size = 0,
},
+ {
+ .type = ION_HEAP_TYPE_IOMMU,
+ .id = TEGRA_ION_HEAP_IOMMU,
+ .name = "iommu",
+ .base = TEGRA_SMMU_BASE,
+ .size = TEGRA_SMMU_SIZE,
+ .dev = &tegra_iommu_device.dev,
+ },
},
};