diff options
author | Ramesh Gupta Guntha <grgupta@ti.com> | 2010-08-10 11:29:46 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:19:12 -0400 |
commit | 6d740555beafbd45fa8786228c1f15e879cad77a (patch) | |
tree | 6f4a7c669c3cebc9ee4cee9258f68618b895a59f /arch/arm | |
parent | f45ec8b162bc0c160d236a551c10ff79deb73060 (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 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) | |||
853 | int err = -ENOMEM; | 853 | int err = -ENOMEM; |
854 | struct device *dev; | 854 | struct device *dev; |
855 | struct iommu *obj; | 855 | struct iommu *obj; |
856 | int rev; | ||
856 | dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name, | 857 | dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name, |
857 | device_match_by_alias); | 858 | device_match_by_alias); |
858 | if (!dev) | 859 | if (!dev) |
@@ -864,12 +865,16 @@ struct iommu *iommu_get(const char *name) | |||
864 | err = iommu_enable(obj); | 865 | err = iommu_enable(obj); |
865 | if (err) | 866 | if (err) |
866 | goto err_enable; | 867 | goto err_enable; |
868 | if (!strcmp(obj->name, "ducati")) { | ||
869 | rev = GET_OMAP_REVISION(); | ||
870 | if (rev == 0x0) | ||
871 | iommu_set_twl(obj, false); | ||
872 | } | ||
873 | |||
867 | flush_iotlb_all(obj); | 874 | flush_iotlb_all(obj); |
868 | } | 875 | } |
869 | if (!try_module_get(obj->owner)) | 876 | if (!try_module_get(obj->owner)) |
870 | goto err_module; | 877 | goto err_module; |
871 | |||
872 | iommu_set_twl(obj, true); | ||
873 | mutex_unlock(&obj->iommu_lock); | 878 | mutex_unlock(&obj->iommu_lock); |
874 | dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name); | 879 | dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name); |
875 | return obj; | 880 | return obj; |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index a95b5b24051..78684ed6acb 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) | |||
315 | filp->private_data = iodmm; | 315 | filp->private_data = iodmm; |
316 | 316 | ||
317 | return 0; | 317 | return 0; |
318 | |||
319 | } | 318 | } |
320 | static int omap_iovmm_release(struct inode *inode, struct file *filp) | 319 | static int omap_iovmm_release(struct inode *inode, struct file *filp) |
321 | { | 320 | { |