diff options
Diffstat (limited to 'arch/arm/plat-omap/iovmm.c')
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index dc3fac3dd0ea..936aef1971cd 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | 20 | ||
21 | #include <mach/iommu.h> | 21 | #include <plat/iommu.h> |
22 | #include <mach/iovmm.h> | 22 | #include <plat/iovmm.h> |
23 | 23 | ||
24 | #include "iopgtable.h" | 24 | #include "iopgtable.h" |
25 | 25 | ||
@@ -392,7 +392,6 @@ static void sgtable_fill_vmalloc(struct sg_table *sgt, void *_va) | |||
392 | } | 392 | } |
393 | 393 | ||
394 | va_end = _va + PAGE_SIZE * i; | 394 | va_end = _va + PAGE_SIZE * i; |
395 | flush_cache_vmap((unsigned long)_va, (unsigned long)va_end); | ||
396 | } | 395 | } |
397 | 396 | ||
398 | static inline void sgtable_drain_vmalloc(struct sg_table *sgt) | 397 | static inline void sgtable_drain_vmalloc(struct sg_table *sgt) |
@@ -427,8 +426,6 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, size_t len) | |||
427 | len -= bytes; | 426 | len -= bytes; |
428 | } | 427 | } |
429 | BUG_ON(len); | 428 | BUG_ON(len); |
430 | |||
431 | clean_dcache_area(va, len); | ||
432 | } | 429 | } |
433 | 430 | ||
434 | static inline void sgtable_drain_kmalloc(struct sg_table *sgt) | 431 | static inline void sgtable_drain_kmalloc(struct sg_table *sgt) |
@@ -449,7 +446,7 @@ static int map_iovm_area(struct iommu *obj, struct iovm_struct *new, | |||
449 | struct scatterlist *sg; | 446 | struct scatterlist *sg; |
450 | u32 da = new->da_start; | 447 | u32 da = new->da_start; |
451 | 448 | ||
452 | if (!obj || !new || !sgt) | 449 | if (!obj || !sgt) |
453 | return -EINVAL; | 450 | return -EINVAL; |
454 | 451 | ||
455 | BUG_ON(!sgtable_ok(sgt)); | 452 | BUG_ON(!sgtable_ok(sgt)); |
@@ -617,7 +614,7 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
617 | u32 flags) | 614 | u32 flags) |
618 | { | 615 | { |
619 | size_t bytes; | 616 | size_t bytes; |
620 | void *va; | 617 | void *va = NULL; |
621 | 618 | ||
622 | if (!obj || !obj->dev || !sgt) | 619 | if (!obj || !obj->dev || !sgt) |
623 | return -EINVAL; | 620 | return -EINVAL; |
@@ -627,9 +624,11 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
627 | return -EINVAL; | 624 | return -EINVAL; |
628 | bytes = PAGE_ALIGN(bytes); | 625 | bytes = PAGE_ALIGN(bytes); |
629 | 626 | ||
630 | va = vmap_sg(sgt); | 627 | if (flags & IOVMF_MMIO) { |
631 | if (IS_ERR(va)) | 628 | va = vmap_sg(sgt); |
632 | return PTR_ERR(va); | 629 | if (IS_ERR(va)) |
630 | return PTR_ERR(va); | ||
631 | } | ||
633 | 632 | ||
634 | flags &= IOVMF_HW_MASK; | 633 | flags &= IOVMF_HW_MASK; |
635 | flags |= IOVMF_DISCONT; | 634 | flags |= IOVMF_DISCONT; |