aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/plat-omap/include/plat/iommu.h8
-rw-r--r--drivers/iommu/omap-iommu.c19
2 files changed, 7 insertions, 20 deletions
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h
index dcb757b87fca..4e9c05c2fdc1 100644
--- a/arch/arm/plat-omap/include/plat/iommu.h
+++ b/arch/arm/plat-omap/include/plat/iommu.h
@@ -153,18 +153,10 @@ struct iommu_platform_data {
153extern u32 iommu_arch_version(void); 153extern u32 iommu_arch_version(void);
154 154
155extern void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e); 155extern void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e);
156extern u32 iotlb_cr_to_virt(struct cr_regs *cr);
157
158extern int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e);
159extern void iommu_set_twl(struct iommu *obj, bool on); 156extern void iommu_set_twl(struct iommu *obj, bool on);
160extern void flush_iotlb_page(struct iommu *obj, u32 da);
161extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end); 157extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end);
162extern void flush_iotlb_all(struct iommu *obj);
163 158
164extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); 159extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e);
165extern void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd,
166 u32 **ppte);
167extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova);
168 160
169extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); 161extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end);
170extern int iommu_set_isr(const char *name, 162extern int iommu_set_isr(const char *name,
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index bf8de6475746..3aad2e34cbab 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -171,11 +171,10 @@ static inline struct cr_regs *iotlb_alloc_cr(struct iommu *obj,
171 return arch_iommu->alloc_cr(obj, e); 171 return arch_iommu->alloc_cr(obj, e);
172} 172}
173 173
174u32 iotlb_cr_to_virt(struct cr_regs *cr) 174static u32 iotlb_cr_to_virt(struct cr_regs *cr)
175{ 175{
176 return arch_iommu->cr_to_virt(cr); 176 return arch_iommu->cr_to_virt(cr);
177} 177}
178EXPORT_SYMBOL_GPL(iotlb_cr_to_virt);
179 178
180static u32 get_iopte_attr(struct iotlb_entry *e) 179static u32 get_iopte_attr(struct iotlb_entry *e)
181{ 180{
@@ -254,7 +253,7 @@ static struct cr_regs __iotlb_read_cr(struct iommu *obj, int n)
254 * @obj: target iommu 253 * @obj: target iommu
255 * @e: an iommu tlb entry info 254 * @e: an iommu tlb entry info
256 **/ 255 **/
257int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e) 256static int load_iotlb_entry(struct iommu *obj, struct iotlb_entry *e)
258{ 257{
259 int err = 0; 258 int err = 0;
260 struct iotlb_lock l; 259 struct iotlb_lock l;
@@ -310,7 +309,6 @@ out:
310 clk_disable(obj->clk); 309 clk_disable(obj->clk);
311 return err; 310 return err;
312} 311}
313EXPORT_SYMBOL_GPL(load_iotlb_entry);
314 312
315/** 313/**
316 * flush_iotlb_page - Clear an iommu tlb entry 314 * flush_iotlb_page - Clear an iommu tlb entry
@@ -319,7 +317,7 @@ EXPORT_SYMBOL_GPL(load_iotlb_entry);
319 * 317 *
320 * Clear an iommu tlb entry which includes 'da' address. 318 * Clear an iommu tlb entry which includes 'da' address.
321 **/ 319 **/
322void flush_iotlb_page(struct iommu *obj, u32 da) 320static void flush_iotlb_page(struct iommu *obj, u32 da)
323{ 321{
324 int i; 322 int i;
325 struct cr_regs cr; 323 struct cr_regs cr;
@@ -348,7 +346,6 @@ void flush_iotlb_page(struct iommu *obj, u32 da)
348 if (i == obj->nr_tlb_entries) 346 if (i == obj->nr_tlb_entries)
349 dev_dbg(obj->dev, "%s: no page for %08x\n", __func__, da); 347 dev_dbg(obj->dev, "%s: no page for %08x\n", __func__, da);
350} 348}
351EXPORT_SYMBOL_GPL(flush_iotlb_page);
352 349
353/** 350/**
354 * flush_iotlb_range - Clear an iommu tlb entries 351 * flush_iotlb_range - Clear an iommu tlb entries
@@ -374,7 +371,7 @@ EXPORT_SYMBOL_GPL(flush_iotlb_range);
374 * flush_iotlb_all - Clear all iommu tlb entries 371 * flush_iotlb_all - Clear all iommu tlb entries
375 * @obj: target iommu 372 * @obj: target iommu
376 **/ 373 **/
377void flush_iotlb_all(struct iommu *obj) 374static void flush_iotlb_all(struct iommu *obj)
378{ 375{
379 struct iotlb_lock l; 376 struct iotlb_lock l;
380 377
@@ -388,7 +385,6 @@ void flush_iotlb_all(struct iommu *obj)
388 385
389 clk_disable(obj->clk); 386 clk_disable(obj->clk);
390} 387}
391EXPORT_SYMBOL_GPL(flush_iotlb_all);
392 388
393/** 389/**
394 * iommu_set_twl - enable/disable table walking logic 390 * iommu_set_twl - enable/disable table walking logic
@@ -682,7 +678,8 @@ EXPORT_SYMBOL_GPL(iopgtable_store_entry);
682 * @ppgd: iommu pgd entry pointer to be returned 678 * @ppgd: iommu pgd entry pointer to be returned
683 * @ppte: iommu pte entry pointer to be returned 679 * @ppte: iommu pte entry pointer to be returned
684 **/ 680 **/
685void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd, u32 **ppte) 681static void
682iopgtable_lookup_entry(struct omap_iommu *obj, u32 da, u32 **ppgd, u32 **ppte)
686{ 683{
687 u32 *iopgd, *iopte = NULL; 684 u32 *iopgd, *iopte = NULL;
688 685
@@ -696,7 +693,6 @@ out:
696 *ppgd = iopgd; 693 *ppgd = iopgd;
697 *ppte = iopte; 694 *ppte = iopte;
698} 695}
699EXPORT_SYMBOL_GPL(iopgtable_lookup_entry);
700 696
701static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da) 697static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da)
702{ 698{
@@ -751,7 +747,7 @@ out:
751 * @obj: target iommu 747 * @obj: target iommu
752 * @da: iommu device virtual address 748 * @da: iommu device virtual address
753 **/ 749 **/
754size_t iopgtable_clear_entry(struct iommu *obj, u32 da) 750static size_t iopgtable_clear_entry(struct iommu *obj, u32 da)
755{ 751{
756 size_t bytes; 752 size_t bytes;
757 753
@@ -764,7 +760,6 @@ size_t iopgtable_clear_entry(struct iommu *obj, u32 da)
764 760
765 return bytes; 761 return bytes;
766} 762}
767EXPORT_SYMBOL_GPL(iopgtable_clear_entry);
768 763
769static void iopgtable_clear_entry_all(struct iommu *obj) 764static void iopgtable_clear_entry_all(struct iommu *obj)
770{ 765{