File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ struct rk_iommu {
144
144
struct iommu_group * group ;
145
145
u32 version ;
146
146
bool shootdown_entire ;
147
+ bool iommu_enabled ;
147
148
};
148
149
149
150
struct rk_iommudata {
@@ -1306,6 +1307,8 @@ static void rk_iommu_disable(struct rk_iommu *iommu)
1306
1307
}
1307
1308
rk_iommu_disable_stall (iommu );
1308
1309
clk_bulk_disable (iommu -> num_clocks , iommu -> clocks );
1310
+
1311
+ iommu -> iommu_enabled = false;
1309
1312
}
1310
1313
1311
1314
int rockchip_iommu_disable (struct device * dev )
@@ -1367,6 +1370,10 @@ static int rk_iommu_enable(struct rk_iommu *iommu)
1367
1370
rk_iommu_disable_stall (iommu );
1368
1371
out_disable_clocks :
1369
1372
clk_bulk_disable (iommu -> num_clocks , iommu -> clocks );
1373
+
1374
+ if (!ret )
1375
+ iommu -> iommu_enabled = true;
1376
+
1370
1377
return ret ;
1371
1378
}
1372
1379
@@ -1390,7 +1397,7 @@ bool rockchip_iommu_is_enabled(struct device *dev)
1390
1397
if (!iommu )
1391
1398
return false;
1392
1399
1393
- return rk_iommu_is_paging_enabled ( iommu ) ;
1400
+ return iommu -> iommu_enabled ;
1394
1401
}
1395
1402
EXPORT_SYMBOL (rockchip_iommu_is_enabled );
1396
1403
You can’t perform that action at this time.
0 commit comments