aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2018-08-27 06:56:24 -0400
committerJoerg Roedel <jroedel@suse.de>2018-09-25 05:13:34 -0400
commit74bc2abca7603c956d1e331e8b9bee7b874c1eec (patch)
treedf1e76847055b509e1c2a49432f1097f057739e1 /drivers
parent6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff)
iommu/rockchip: Free irqs in shutdown handler
In the iommu's shutdown handler we disable runtime-pm which could result in the irq-handler running unclocked and since commit 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework") we warn about that fact. This can cause warnings on shutdown on some Rockchip machines, so free the irqs in the shutdown handler before we disable runtime-pm. Reported-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Fixes: 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework") Signed-off-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/rockchip-iommu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 258115b10fa9..ad3e2b97469e 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1241,6 +1241,12 @@ err_unprepare_clocks:
1241 1241
1242static void rk_iommu_shutdown(struct platform_device *pdev) 1242static void rk_iommu_shutdown(struct platform_device *pdev)
1243{ 1243{
1244 struct rk_iommu *iommu = platform_get_drvdata(pdev);
1245 int i = 0, irq;
1246
1247 while ((irq = platform_get_irq(pdev, i++)) != -ENXIO)
1248 devm_free_irq(iommu->dev, irq, iommu);
1249
1244 pm_runtime_force_suspend(&pdev->dev); 1250 pm_runtime_force_suspend(&pdev->dev);
1245} 1251}
1246 1252