summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanyuan Liu <yuanliu@codeaurora.org>2016-05-03 18:38:21 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-05 15:05:54 -0700
commit12fcd447522e37cdafd2f9c3e35b488fd412691f (patch)
tree1357925ff0f3e39ff76b52a96d7300edc4589928
parent1f75bbf5b6715d46819a285aaa66177f21ea6365 (diff)
icnss: Enable SMMU BYPASS mode
The plan was to use bypass mode till fastpath API's are available. Hence enable SMMU BYPASS mode. Change-Id: I53bcd8293f7587ddba64ed0e019b77eee62b5e72 Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
-rw-r--r--drivers/soc/qcom/icnss.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c
index d34fdcd3b1fe..a64fdac00ff4 100644
--- a/drivers/soc/qcom/icnss.c
+++ b/drivers/soc/qcom/icnss.c
@@ -1224,6 +1224,7 @@ static int icnss_smmu_init(struct device *dev)
struct dma_iommu_mapping *mapping;
int disable_htw = 1;
int atomic_ctx = 1;
+ int s1_bypass = 1;
int ret = 0;
mapping = arm_iommu_create_mapping(&platform_bus_type,
@@ -1253,6 +1254,15 @@ static int icnss_smmu_init(struct device *dev)
goto set_attr_fail;
}
+ ret = iommu_domain_set_attr(mapping->domain,
+ DOMAIN_ATTR_S1_BYPASS,
+ &s1_bypass);
+ if (ret < 0) {
+ pr_err("%s: set s1_bypass attribute failed, err = %d\n",
+ __func__, ret);
+ goto set_attr_fail;
+ }
+
ret = arm_iommu_attach_device(dev, mapping);
if (ret < 0) {
pr_err("%s: attach device failed, err = %d\n", __func__, ret);