summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamesh Gupta Guntha <grgupta@ti.com>2011-10-25 10:50:51 +0800
committerAndy Green <andy.green@linaro.org>2011-10-25 10:50:51 +0800
commit36c5bd4afc577d081544d99f356cea0beb359bfa (patch)
treeef413942489d29bf744d60659074dfa7a5cbb837
parent194b4939daf700742bf5bcfe0d47c752e9f614f1 (diff)
omap:iommu-disable TWL for ES1.0 by checking the CPU Revision
Disable TWL for ES1.0 by checking the CPU Revision [Hari] - Amended the patch to move enabling/disabling of TWL part to iommu_get function since this needs to be executed only once. Signed-off-by: Ramesh Gupta G <grgupta@ti.com> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
-rw-r--r--arch/arm/plat-omap/iommu.c9
-rw-r--r--arch/arm/plat-omap/iovmm.c1
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index ec6e20c7643..aaf1ac8c738 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -853,6 +853,7 @@ struct iommu *iommu_get(const char *name)
int err = -ENOMEM;
struct device *dev;
struct iommu *obj;
+ int rev;
dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name,
device_match_by_alias);
if (!dev)
@@ -864,12 +865,16 @@ struct iommu *iommu_get(const char *name)
err = iommu_enable(obj);
if (err)
goto err_enable;
+ if (!strcmp(obj->name, "ducati")) {
+ rev = GET_OMAP_REVISION();
+ if (rev == 0x0)
+ iommu_set_twl(obj, false);
+ }
+
flush_iotlb_all(obj);
}
if (!try_module_get(obj->owner))
goto err_module;
-
- iommu_set_twl(obj, true);
mutex_unlock(&obj->iommu_lock);
dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name);
return obj;
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 31b68a08e5b..6b376ffdd37 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -315,7 +315,6 @@ static int omap_iovmm_open(struct inode *inode, struct file *filp)
filp->private_data = iodmm;
return 0;
-
}
static int omap_iovmm_release(struct inode *inode, struct file *filp)
{