File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,8 @@ static const struct arm_smmu_impl arm_mmu500_impl = {
150
150
151
151
struct arm_smmu_device * arm_smmu_impl_init (struct arm_smmu_device * smmu )
152
152
{
153
+ const struct device_node * np = smmu -> dev -> of_node ;
154
+
153
155
/*
154
156
* We will inevitably have to combine model-specific implementation
155
157
* quirks with platform-specific integration quirks, but everything
@@ -166,11 +168,11 @@ struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu)
166
168
break ;
167
169
}
168
170
169
- if (of_property_read_bool (smmu -> dev -> of_node ,
170
- "calxeda,smmu-secure-config-access" ))
171
+ if (of_property_read_bool (np , "calxeda,smmu-secure-config-access" ))
171
172
smmu -> impl = & calxeda_impl ;
172
173
173
- if (of_device_is_compatible (smmu -> dev -> of_node , "qcom,sdm845-smmu-500" ))
174
+ if (of_device_is_compatible (np , "qcom,sdm845-smmu-500" ) ||
175
+ of_device_is_compatible (np , "qcom,sc7180-smmu-500" ))
174
176
return qcom_smmu_impl_init (smmu );
175
177
176
178
return smmu ;
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ static int qcom_sdm845_smmu500_reset(struct arm_smmu_device *smmu)
15
15
{
16
16
int ret ;
17
17
18
- arm_mmu500_reset (smmu );
19
-
20
18
/*
21
19
* To address performance degradation in non-real time clients,
22
20
* such as USB and UFS, turn off wait-for-safe on sdm845 based boards,
@@ -30,8 +28,20 @@ static int qcom_sdm845_smmu500_reset(struct arm_smmu_device *smmu)
30
28
return ret ;
31
29
}
32
30
31
+ static int qcom_smmu500_reset (struct arm_smmu_device * smmu )
32
+ {
33
+ const struct device_node * np = smmu -> dev -> of_node ;
34
+
35
+ arm_mmu500_reset (smmu );
36
+
37
+ if (of_device_is_compatible (np , "qcom,sdm845-smmu-500" ))
38
+ return qcom_sdm845_smmu500_reset (smmu );
39
+
40
+ return 0 ;
41
+ }
42
+
33
43
static const struct arm_smmu_impl qcom_smmu_impl = {
34
- .reset = qcom_sdm845_smmu500_reset ,
44
+ .reset = qcom_smmu500_reset ,
35
45
};
36
46
37
47
struct arm_smmu_device * qcom_smmu_impl_init (struct arm_smmu_device * smmu )
You can’t perform that action at this time.
0 commit comments