Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dfa7fd5 authored by Shiraz Hashim's avatar Shiraz Hashim
Browse files

iommu: msm: add iommu->capable hook



Add iommu->capable hook to legacy iommu driver. Based
upon legacy support it returns false for all present
possible capabilities.

Change-Id: Ia4ee2e01c65a541a7154cb7b4c6ada281da3a200
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
parent 6f524acc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1188,6 +1188,11 @@ fail:
	return ret;
}

static bool msm_iommu_capable(enum iommu_cap cap)
{
	return false;
}

#ifdef CONFIG_IOMMU_LPAE
static inline void print_ctx_mem_attr_regs(struct msm_iommu_context_reg regs[])
{
@@ -1554,6 +1559,7 @@ static struct iommu_ops msm_iommu_ops = {
	.unmap_range = msm_iommu_unmap_range,
	.map_sg = msm_iommu_map_sg,
	.iova_to_phys = msm_iommu_iova_to_phys,
	.capable = msm_iommu_capable,
	.pgsize_bitmap = MSM_IOMMU_PGSIZES,
	.domain_set_attr = msm_iommu_domain_set_attr,
	.domain_get_attr = msm_iommu_domain_get_attr,
+6 −0
Original line number Diff line number Diff line
@@ -972,6 +972,11 @@ static phys_addr_t msm_iommu_iova_to_phys(struct iommu_domain *domain,
	return 0;
}

static bool msm_iommu_capable(enum iommu_cap cap)
{
	return false;
}

void msm_iommu_check_scm_call_avail(void)
{
	is_secure = scm_is_call_available(SCM_SVC_MP, IOMMU_SECURE_CFG);
@@ -1010,6 +1015,7 @@ static struct iommu_ops msm_iommu_ops = {
	.map_sg = msm_iommu_map_sg,
	.unmap_range = msm_iommu_unmap_range,
	.iova_to_phys = msm_iommu_iova_to_phys,
	.capable = msm_iommu_capable,
	.pgsize_bitmap = MSM_IOMMU_PGSIZES,
};