forked from rubenslte/android_kernel_samsung_msm8226
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:
committed by
Bryan Huntsman
parent
88196b3601
commit
6eb4dc3e66
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user