msm_11ad: set geometry attr when SMMU stage1 is enabled
When SMMU stage1 is enabled, set IOVA base and end in geometry attr to allow PCIe driver to map the GIC MSI address. Change-Id: I7826a941823a6204143ea077a45c71b22316699b Signed-off-by: Maya Erez <merez@codeaurora.org>
This commit is contained in:
parent
4a4051e573
commit
6f55f74182
1 changed files with 14 additions and 0 deletions
|
@ -643,6 +643,9 @@ static int msm_11ad_smmu_init(struct msm11ad_ctx *ctx)
|
|||
int rc;
|
||||
int force_pt_coherent = 1;
|
||||
int smmu_bypass = !ctx->smmu_s1_en;
|
||||
dma_addr_t iova_base = 0;
|
||||
dma_addr_t iova_end = ctx->smmu_base + ctx->smmu_size - 1;
|
||||
struct iommu_domain_geometry geometry;
|
||||
|
||||
if (!ctx->use_smmu)
|
||||
return 0;
|
||||
|
@ -700,6 +703,17 @@ static int msm_11ad_smmu_init(struct msm11ad_ctx *ctx)
|
|||
rc);
|
||||
goto release_mapping;
|
||||
}
|
||||
memset(&geometry, 0, sizeof(geometry));
|
||||
geometry.aperture_start = iova_base;
|
||||
geometry.aperture_end = iova_end;
|
||||
rc = iommu_domain_set_attr(ctx->mapping->domain,
|
||||
DOMAIN_ATTR_GEOMETRY,
|
||||
&geometry);
|
||||
if (rc) {
|
||||
dev_err(ctx->dev, "Set geometry attribute to SMMU failed (%d)\n",
|
||||
rc);
|
||||
goto release_mapping;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue