|
@@ -362,26 +362,6 @@ static void flush_iotlb_page(struct iommu *obj, u32 da)
|
|
dev_dbg(obj->dev, "%s: no page for %08x\n", __func__, da);
|
|
dev_dbg(obj->dev, "%s: no page for %08x\n", __func__, da);
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * flush_iotlb_range - Clear an iommu tlb entries
|
|
|
|
- * @obj: target iommu
|
|
|
|
- * @start: iommu device virtual address(start)
|
|
|
|
- * @end: iommu device virtual address(end)
|
|
|
|
- *
|
|
|
|
- * Clear an iommu tlb entry which includes 'da' address.
|
|
|
|
- **/
|
|
|
|
-void flush_iotlb_range(struct iommu *obj, u32 start, u32 end)
|
|
|
|
-{
|
|
|
|
- u32 da = start;
|
|
|
|
-
|
|
|
|
- while (da < end) {
|
|
|
|
- flush_iotlb_page(obj, da);
|
|
|
|
- /* FIXME: Optimize for multiple page size */
|
|
|
|
- da += IOPTE_SIZE;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL_GPL(flush_iotlb_range);
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* flush_iotlb_all - Clear all iommu tlb entries
|
|
* flush_iotlb_all - Clear all iommu tlb entries
|
|
* @obj: target iommu
|
|
* @obj: target iommu
|
|
@@ -401,23 +381,6 @@ static void flush_iotlb_all(struct iommu *obj)
|
|
clk_disable(obj->clk);
|
|
clk_disable(obj->clk);
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * iommu_set_twl - enable/disable table walking logic
|
|
|
|
- * @obj: target iommu
|
|
|
|
- * @on: enable/disable
|
|
|
|
- *
|
|
|
|
- * Function used to enable/disable TWL. If one wants to work
|
|
|
|
- * exclusively with locked TLB entries and receive notifications
|
|
|
|
- * for TLB miss then call this function to disable TWL.
|
|
|
|
- */
|
|
|
|
-void iommu_set_twl(struct iommu *obj, bool on)
|
|
|
|
-{
|
|
|
|
- clk_enable(obj->clk);
|
|
|
|
- arch_iommu->set_twl(obj, on);
|
|
|
|
- clk_disable(obj->clk);
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL_GPL(iommu_set_twl);
|
|
|
|
-
|
|
|
|
#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
|
|
#if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE)
|
|
|
|
|
|
ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
|
|
ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes)
|
|
@@ -853,28 +816,6 @@ static int device_match_by_alias(struct device *dev, void *data)
|
|
return strcmp(obj->name, name) == 0;
|
|
return strcmp(obj->name, name) == 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * iommu_set_da_range - Set a valid device address range
|
|
|
|
- * @obj: target iommu
|
|
|
|
- * @start Start of valid range
|
|
|
|
- * @end End of valid range
|
|
|
|
- **/
|
|
|
|
-int iommu_set_da_range(struct iommu *obj, u32 start, u32 end)
|
|
|
|
-{
|
|
|
|
-
|
|
|
|
- if (!obj)
|
|
|
|
- return -EFAULT;
|
|
|
|
-
|
|
|
|
- if (end < start || !PAGE_ALIGN(start | end))
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
- obj->da_start = start;
|
|
|
|
- obj->da_end = end;
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL_GPL(iommu_set_da_range);
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* omap_find_iommu_device() - find an omap iommu device by name
|
|
* omap_find_iommu_device() - find an omap iommu device by name
|
|
* @name: name of the iommu device
|
|
* @name: name of the iommu device
|