3
3
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
4
4
*/
5
5
6
+ #include <linux/of_device.h>
6
7
#include <linux/qcom_scm.h>
7
8
8
9
#include "arm-smmu.h"
@@ -11,6 +12,23 @@ struct qcom_smmu {
11
12
struct arm_smmu_device smmu ;
12
13
};
13
14
15
+ static const struct of_device_id qcom_smmu_client_of_match [] = {
16
+ { .compatible = "qcom,adreno" },
17
+ { .compatible = "qcom,mdp4" },
18
+ { .compatible = "qcom,mdss" },
19
+ { .compatible = "qcom,sc7180-mdss" },
20
+ { .compatible = "qcom,sdm845-mdss" },
21
+ { }
22
+ };
23
+
24
+ static int qcom_smmu_def_domain_type (struct device * dev )
25
+ {
26
+ const struct of_device_id * match =
27
+ of_match_device (qcom_smmu_client_of_match , dev );
28
+
29
+ return match ? IOMMU_DOMAIN_IDENTITY : 0 ;
30
+ }
31
+
14
32
static int qcom_sdm845_smmu500_reset (struct arm_smmu_device * smmu )
15
33
{
16
34
int ret ;
@@ -41,6 +59,7 @@ static int qcom_smmu500_reset(struct arm_smmu_device *smmu)
41
59
}
42
60
43
61
static const struct arm_smmu_impl qcom_smmu_impl = {
62
+ .def_domain_type = qcom_smmu_def_domain_type ,
44
63
.reset = qcom_smmu500_reset ,
45
64
};
46
65
0 commit comments