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: Chintan Pandya <cpandya@codeaurora.org>
This commit is contained in:
Chintan Pandya
2014-01-24 05:55:29 -08:00
committed by Bryan Huntsman
parent 88196b3601
commit 6eb4dc3e66
+9 -2
View File
@@ -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)