diff options
| -rw-r--r-- | arch/arm/plat-omap/include/plat/iommu.h | 3 | ||||
| -rw-r--r-- | drivers/iommu/omap-iommu.c | 59 |
2 files changed, 0 insertions, 62 deletions
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 4e9c05c2fdc1..9ae1e279864a 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h | |||
| @@ -153,12 +153,9 @@ struct iommu_platform_data { | |||
| 153 | extern u32 iommu_arch_version(void); | 153 | extern u32 iommu_arch_version(void); |
| 154 | 154 | ||
| 155 | extern void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e); | 155 | extern void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e); |
| 156 | extern void iommu_set_twl(struct iommu *obj, bool on); | ||
| 157 | extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end); | ||
| 158 | 156 | ||
| 159 | extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); | 157 | extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); |
| 160 | 158 | ||
| 161 | extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); | ||
| 162 | extern int iommu_set_isr(const char *name, | 159 | extern int iommu_set_isr(const char *name, |
| 163 | int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, | 160 | int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, |
| 164 | void *priv), | 161 | void *priv), |
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 966093a2fcf5..d0f28e73be67 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
| @@ -363,26 +363,6 @@ static void flush_iotlb_page(struct iommu *obj, u32 da) | |||
| 363 | } | 363 | } |
| 364 | 364 | ||
| 365 | /** | 365 | /** |
| 366 | * flush_iotlb_range - Clear an iommu tlb entries | ||
| 367 | * @obj: target iommu | ||
| 368 | * @start: iommu device virtual address(start) | ||
| 369 | * @end: iommu device virtual address(end) | ||
| 370 | * | ||
| 371 | * Clear an iommu tlb entry which includes 'da' address. | ||
| 372 | **/ | ||
| 373 | void flush_iotlb_range(struct iommu *obj, u32 start, u32 end) | ||
| 374 | { | ||
| 375 | u32 da = start; | ||
| 376 | |||
| 377 | while (da < end) { | ||
| 378 | flush_iotlb_page(obj, da); | ||
| 379 | /* FIXME: Optimize for multiple page size */ | ||
| 380 | da += IOPTE_SIZE; | ||
| 381 | } | ||
| 382 | } | ||
| 383 | EXPORT_SYMBOL_GPL(flush_iotlb_range); | ||
| 384 | |||
| 385 | /** | ||
| 386 | * flush_iotlb_all - Clear all iommu tlb entries | 366 | * flush_iotlb_all - Clear all iommu tlb entries |
| 387 | * @obj: target iommu | 367 | * @obj: target iommu |
| 388 | **/ | 368 | **/ |
| @@ -401,23 +381,6 @@ static void flush_iotlb_all(struct iommu *obj) | |||
| 401 | clk_disable(obj->clk); | 381 | clk_disable(obj->clk); |
| 402 | } | 382 | } |
| 403 | 383 | ||
| 404 | /** | ||
| 405 | * iommu_set_twl - enable/disable table walking logic | ||
| 406 | * @obj: target iommu | ||
| 407 | * @on: enable/disable | ||
| 408 | * | ||
| 409 | * Function used to enable/disable TWL. If one wants to work | ||
| 410 | * exclusively with locked TLB entries and receive notifications | ||
| 411 | * for TLB miss then call this function to disable TWL. | ||
| 412 | */ | ||
| 413 | void iommu_set_twl(struct iommu *obj, bool on) | ||
| 414 | { | ||
| 415 | clk_enable(obj->clk); | ||
| 416 | arch_iommu->set_twl(obj, on); | ||
| 417 | clk_disable(obj->clk); | ||
| 418 | } | ||
| 419 | EXPORT_SYMBOL_GPL(iommu_set_twl); | ||
| 420 | |||
| 421 | #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE) | 384 | #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE) |
| 422 | 385 | ||
| 423 | ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes) | 386 | ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes) |
| @@ -854,28 +817,6 @@ static int device_match_by_alias(struct device *dev, void *data) | |||
| 854 | } | 817 | } |
| 855 | 818 | ||
| 856 | /** | 819 | /** |
| 857 | * iommu_set_da_range - Set a valid device address range | ||
| 858 | * @obj: target iommu | ||
| 859 | * @start Start of valid range | ||
| 860 | * @end End of valid range | ||
| 861 | **/ | ||
| 862 | int iommu_set_da_range(struct iommu *obj, u32 start, u32 end) | ||
| 863 | { | ||
| 864 | |||
| 865 | if (!obj) | ||
| 866 | return -EFAULT; | ||
| 867 | |||
| 868 | if (end < start || !PAGE_ALIGN(start | end)) | ||
| 869 | return -EINVAL; | ||
| 870 | |||
| 871 | obj->da_start = start; | ||
| 872 | obj->da_end = end; | ||
| 873 | |||
| 874 | return 0; | ||
| 875 | } | ||
| 876 | EXPORT_SYMBOL_GPL(iommu_set_da_range); | ||
| 877 | |||
| 878 | /** | ||
| 879 | * omap_find_iommu_device() - find an omap iommu device by name | 820 | * omap_find_iommu_device() - find an omap iommu device by name |
| 880 | * @name: name of the iommu device | 821 | * @name: name of the iommu device |
| 881 | * | 822 | * |
