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

Commit 52f75ed7 authored by Chintan Pandya's avatar Chintan Pandya
Browse files

iommu: msm: Create secure page tables for SMMUv2 also



Secure page tables for SMMUs only look up for SMMUv1. Support
SMMUv2 also.

Change-Id: I802b7e3b8da8311c8f501ea939f66bd48f5649fd
Signed-off-by: default avatarChintan Pandya <cpandya@codeaurora.org>
parent 5f4d31f2
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -61,6 +61,12 @@

static struct iommu_access_ops *iommu_access_ops;

static const struct of_device_id msm_smmu_list[] = {
	{ .compatible = "qcom,msm-smmu-v1", },
	{ .compatible = "qcom,msm-smmu-v2", },
	{ }
};

struct msm_scm_paddr_list {
	unsigned int list;
	unsigned int list_size;
@@ -296,8 +302,9 @@ static int msm_iommu_sec_ptbl_init(void)
	int ret, ptbl_ret = 0;
	int version;

	for_each_compatible_node(np, NULL, "qcom,msm-smmu-v1")
		if (of_find_property(np, "qcom,iommu-secure-id", NULL))
	for_each_matching_node(np, msm_smmu_list)
		if (of_find_property(np, "qcom,iommu-secure-id", NULL) &&
				of_device_is_available(np))
			break;

	if (!np)