diff options
author | Ramesh Gupta Guntha <grgupta@ti.com> | 2011-05-31 09:24:35 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:06:06 +0100 |
commit | efc9d9f3506a8a4821dd58c4bdb17d08111aac1c (patch) | |
tree | 7b1396fdb57784674adaddcaaf9da9178d8b4b47 /arch/arm | |
parent | 7e5bd659a57396a1acdb71e2399434008f858e9f (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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/plat-omap/iommu.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index 737ccd156de..de5283e30e9 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c @@ -844,6 +844,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) @@ -855,12 +856,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 ec6c925855e..5afe7bc89e3 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) { |