diff options
author | Omar Ramirez Luna <omar.ramirez@ti.com> | 2011-03-25 16:04:31 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-06-01 05:25:04 -0400 |
commit | 50b4860d577b4bef76c71ad38ef83b9f368283c2 (patch) | |
tree | 11df5169b673bc5fed55042a205813c3e799c618 /arch | |
parent | 77f7059a329fc8a514bbcc2f204aaa7c150e8046 (diff) |
OMAP: iovmm: fix SW flags passed by user
Commit d038aee24dcd5a2a0d8547f5396f67ae9698ac8e
"omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag",
changes iovmm to receive flags specified by user, however
the upper 16 bits of the flags are wiped by iovmm itself.
This fixes IOVMF_DA_FIXED flags from being lost, and lets the user
map its desired "device addresses".
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-omap/include/plat/iovmm.h | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 4 |
2 files changed, 0 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h index 32a2f6c4d39e..e992b9655fbc 100644 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ b/arch/arm/plat-omap/include/plat/iovmm.h | |||
@@ -29,9 +29,6 @@ struct iovm_struct { | |||
29 | * lower 16 bit is used for h/w and upper 16 bit is for s/w. | 29 | * lower 16 bit is used for h/w and upper 16 bit is for s/w. |
30 | */ | 30 | */ |
31 | #define IOVMF_SW_SHIFT 16 | 31 | #define IOVMF_SW_SHIFT 16 |
32 | #define IOVMF_HW_SIZE (1 << IOVMF_SW_SHIFT) | ||
33 | #define IOVMF_HW_MASK (IOVMF_HW_SIZE - 1) | ||
34 | #define IOVMF_SW_MASK (~IOVMF_HW_MASK)UL | ||
35 | 32 | ||
36 | /* | 33 | /* |
37 | * iovma: h/w flags derived from cam and ram attribute | 34 | * iovma: h/w flags derived from cam and ram attribute |
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 51ef43e8def6..83a37c54342f 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c | |||
@@ -648,7 +648,6 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, | |||
648 | return PTR_ERR(va); | 648 | return PTR_ERR(va); |
649 | } | 649 | } |
650 | 650 | ||
651 | flags &= IOVMF_HW_MASK; | ||
652 | flags |= IOVMF_DISCONT; | 651 | flags |= IOVMF_DISCONT; |
653 | flags |= IOVMF_MMIO; | 652 | flags |= IOVMF_MMIO; |
654 | 653 | ||
@@ -706,7 +705,6 @@ u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) | |||
706 | if (!va) | 705 | if (!va) |
707 | return -ENOMEM; | 706 | return -ENOMEM; |
708 | 707 | ||
709 | flags &= IOVMF_HW_MASK; | ||
710 | flags |= IOVMF_DISCONT; | 708 | flags |= IOVMF_DISCONT; |
711 | flags |= IOVMF_ALLOC; | 709 | flags |= IOVMF_ALLOC; |
712 | 710 | ||
@@ -795,7 +793,6 @@ u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes, | |||
795 | if (!va) | 793 | if (!va) |
796 | return -ENOMEM; | 794 | return -ENOMEM; |
797 | 795 | ||
798 | flags &= IOVMF_HW_MASK; | ||
799 | flags |= IOVMF_LINEAR; | 796 | flags |= IOVMF_LINEAR; |
800 | flags |= IOVMF_MMIO; | 797 | flags |= IOVMF_MMIO; |
801 | 798 | ||
@@ -853,7 +850,6 @@ u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) | |||
853 | return -ENOMEM; | 850 | return -ENOMEM; |
854 | pa = virt_to_phys(va); | 851 | pa = virt_to_phys(va); |
855 | 852 | ||
856 | flags &= IOVMF_HW_MASK; | ||
857 | flags |= IOVMF_LINEAR; | 853 | flags |= IOVMF_LINEAR; |
858 | flags |= IOVMF_ALLOC; | 854 | flags |= IOVMF_ALLOC; |
859 | 855 | ||