summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorChintan Pandya <cpandya@codeaurora.org>2014-03-11 17:59:28 -0700
committerChintan Pandya <cpandya@codeaurora.org>2014-03-12 07:19:30 +0530
commit0624c3128ea6faae6ccc47698cbef92f5b26cca5 (patch)
tree16cf6e03a5df137e60a6110d8543f53b8bfed251 /drivers/iommu
parent01f3b4c624c1d842e3704ee46df585ca3aa46592 (diff)
iommu: msm: Enable aggregated CB interrupts for secure SMMUs also
Present logic of enabling aggregated CB interrupts works only for non-secure SMMUs. Improvise that logic to enable interrupts for secure SMMUs also. Change-Id: I77f914de760562ce30b7ade512a12639eb84af6d Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/msm_iommu-v1.c2
-rw-r--r--drivers/iommu/msm_iommu_sec.c17
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/iommu/msm_iommu-v1.c b/drivers/iommu/msm_iommu-v1.c
index cfa91aaac15c..7f1f7bcd0e73 100644
--- a/drivers/iommu/msm_iommu-v1.c
+++ b/drivers/iommu/msm_iommu-v1.c
@@ -825,7 +825,7 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev)
iommu_resume(iommu_drvdata);
} else {
ret = msm_iommu_sec_program_iommu(
- iommu_drvdata->sec_id, ctx_drvdata->num);
+ iommu_drvdata, ctx_drvdata);
if (ret) {
__disable_regulators(iommu_drvdata);
__disable_clocks(iommu_drvdata);
diff --git a/drivers/iommu/msm_iommu_sec.c b/drivers/iommu/msm_iommu_sec.c
index c6de1713bca7..80ed1704d3b5 100644
--- a/drivers/iommu/msm_iommu_sec.c
+++ b/drivers/iommu/msm_iommu_sec.c
@@ -414,7 +414,8 @@ fail:
return ret;
}
-int msm_iommu_sec_program_iommu(int sec_id, u32 cb_num)
+int msm_iommu_sec_program_iommu(struct msm_iommu_drvdata *drvdata,
+ struct msm_iommu_ctx_drvdata *ctx_drvdata)
{
struct msm_scm_sec_cfg {
unsigned int id;
@@ -422,8 +423,14 @@ int msm_iommu_sec_program_iommu(int sec_id, u32 cb_num)
} cfg;
int ret, scm_ret = 0;
- cfg.id = sec_id;
- cfg.spare = cb_num;
+ cfg.id = drvdata->sec_id;
+ cfg.spare = ctx_drvdata->num;
+
+ if (drvdata->smmu_local_base) {
+ writel_relaxed(0xFFFFFFFF, drvdata->smmu_local_base +
+ SMMU_INTR_SEL_NS);
+ mb();
+ }
ret = scm_call(SCM_SVC_MP, IOMMU_SECURE_CFG, &cfg, sizeof(cfg),
&scm_ret, sizeof(scm_ret));
@@ -643,8 +650,8 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev)
goto fail;
}
- ret = msm_iommu_sec_program_iommu(iommu_drvdata->sec_id,
- ctx_drvdata->num);
+ ret = msm_iommu_sec_program_iommu(iommu_drvdata,
+ ctx_drvdata);
/* bfb settings are always programmed by HLOS */
program_iommu_bfb_settings(iommu_drvdata->base,