diff options
author | Robin Murphy <robin.murphy@arm.com> | 2017-08-08 09:56:15 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-08-16 12:27:29 -0400 |
commit | a2d866f7d66574d980a2e4544bc626e29bb33365 (patch) | |
tree | 87dba0b5d3c1d77e4f5dddb2690ce43abdf07660 /drivers/iommu/arm-smmu.c | |
parent | 90df373cc62e527b010025249d11d10d19b086bd (diff) |
iommu/arm-smmu: Add system PM support
With all our hardware state tracked in such a way that we can naturally
restore it as part of the necessary reset, resuming is trivial, and
there's nothing to do on suspend at all.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r-- | drivers/iommu/arm-smmu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 0a5fa126f379..445f0ea38272 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c | |||
@@ -2372,10 +2372,21 @@ static void arm_smmu_device_shutdown(struct platform_device *pdev) | |||
2372 | arm_smmu_device_remove(pdev); | 2372 | arm_smmu_device_remove(pdev); |
2373 | } | 2373 | } |
2374 | 2374 | ||
2375 | static int __maybe_unused arm_smmu_pm_resume(struct device *dev) | ||
2376 | { | ||
2377 | struct arm_smmu_device *smmu = dev_get_drvdata(dev); | ||
2378 | |||
2379 | arm_smmu_device_reset(smmu); | ||
2380 | return 0; | ||
2381 | } | ||
2382 | |||
2383 | static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume); | ||
2384 | |||
2375 | static struct platform_driver arm_smmu_driver = { | 2385 | static struct platform_driver arm_smmu_driver = { |
2376 | .driver = { | 2386 | .driver = { |
2377 | .name = "arm-smmu", | 2387 | .name = "arm-smmu", |
2378 | .of_match_table = of_match_ptr(arm_smmu_of_match), | 2388 | .of_match_table = of_match_ptr(arm_smmu_of_match), |
2389 | .pm = &arm_smmu_pm_ops, | ||
2379 | }, | 2390 | }, |
2380 | .probe = arm_smmu_device_probe, | 2391 | .probe = arm_smmu_device_probe, |
2381 | .remove = arm_smmu_device_remove, | 2392 | .remove = arm_smmu_device_remove, |