msm: Select page protection for IOMMU

IOMMU mapping requires explicit attributes for mapping instead
of relying on defaults. Add explicit page protection attributes
when mapping contiguous buffers.

Change-Id: I01e19eebd5b1a1c2456ba99861641baafbabe97a
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/arch/arm/mach-msm/iommu_domains.c b/arch/arm/mach-msm/iommu_domains.c
index e7287c1..a7e06ba 100644
--- a/arch/arm/mach-msm/iommu_domains.c
+++ b/arch/arm/mach-msm/iommu_domains.c
@@ -99,6 +99,8 @@
 {
 	int ret;
 	struct scatterlist *sglist;
+	int prot = IOMMU_WRITE | IOMMU_READ;
+	prot |= cached ? IOMMU_CACHE : 0;
 
 	sglist = vmalloc(sizeof(*sglist));
 	if (!sglist) {
@@ -111,7 +113,7 @@
 	sglist->offset = 0;
 	sglist->dma_address = phys;
 
-	ret = iommu_map_range(domain, iova, sglist, size, cached);
+	ret = iommu_map_range(domain, iova, sglist, size, prot);
 	if (ret) {
 		pr_err("%s: could not map extra %lx in domain %p\n",
 			__func__, iova, domain);