mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
iommu/rockchip: ignore device_link for vop
iommu may enabled by pm_runtime_get_sync from vop, this path is not accept by vop, so ignore device_link for vop Change-Id: I532a2a964b423e78fadec02c3b4c2952301ebf4b Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
@@ -102,6 +102,7 @@ struct rk_iommu {
|
||||
int num_clocks;
|
||||
bool reset_disabled;
|
||||
bool skip_read; /* rk3126/rk3128 can't read vop iommu registers */
|
||||
bool dlr_disable; /* avoid access iommu when runtime ops called */
|
||||
struct iommu_device iommu;
|
||||
struct list_head node; /* entry in rk_iommu_domain.iommus */
|
||||
struct iommu_domain *domain; /* domain to which iommu is attached */
|
||||
@@ -1216,6 +1217,8 @@ static int rk_iommu_probe(struct platform_device *pdev)
|
||||
"rockchip,disable-mmu-reset");
|
||||
iommu->skip_read = device_property_read_bool(dev,
|
||||
"rockchip,skip-mmu-read");
|
||||
iommu->dlr_disable = device_property_read_bool(dev,
|
||||
"rockchip,disable-device-link-resume");
|
||||
|
||||
iommu->num_clocks = ARRAY_SIZE(rk_iommu_clocks);
|
||||
|
||||
@@ -1335,6 +1338,9 @@ static int __maybe_unused rk_iommu_suspend(struct device *dev)
|
||||
if (!iommu->domain)
|
||||
return 0;
|
||||
|
||||
if (iommu->dlr_disable)
|
||||
return 0;
|
||||
|
||||
rk_iommu_disable(iommu);
|
||||
return 0;
|
||||
}
|
||||
@@ -1346,6 +1352,9 @@ static int __maybe_unused rk_iommu_resume(struct device *dev)
|
||||
if (!iommu->domain)
|
||||
return 0;
|
||||
|
||||
if (iommu->dlr_disable)
|
||||
return 0;
|
||||
|
||||
return rk_iommu_enable(iommu);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user