Commit 7aa8619a authored by Nate Watterson's avatar Nate Watterson Committed by Will Deacon

iommu/arm-smmu-v3: Implement shutdown method

The shutdown method disables the SMMU to avoid corrupting a new kernel
started with kexec.
Signed-off-by: default avatarNate Watterson <nwatters@codeaurora.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent aae4e7a8
...@@ -2852,9 +2852,15 @@ static int arm_smmu_device_remove(struct platform_device *pdev) ...@@ -2852,9 +2852,15 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
struct arm_smmu_device *smmu = platform_get_drvdata(pdev); struct arm_smmu_device *smmu = platform_get_drvdata(pdev);
arm_smmu_device_disable(smmu); arm_smmu_device_disable(smmu);
return 0; return 0;
} }
static void arm_smmu_device_shutdown(struct platform_device *pdev)
{
arm_smmu_device_remove(pdev);
}
static const struct of_device_id arm_smmu_of_match[] = { static const struct of_device_id arm_smmu_of_match[] = {
{ .compatible = "arm,smmu-v3", }, { .compatible = "arm,smmu-v3", },
{ }, { },
...@@ -2868,6 +2874,7 @@ static struct platform_driver arm_smmu_driver = { ...@@ -2868,6 +2874,7 @@ static struct platform_driver arm_smmu_driver = {
}, },
.probe = arm_smmu_device_probe, .probe = arm_smmu_device_probe,
.remove = arm_smmu_device_remove, .remove = arm_smmu_device_remove,
.shutdown = arm_smmu_device_shutdown,
}; };
module_platform_driver(arm_smmu_driver); module_platform_driver(arm_smmu_driver);
......
...@@ -2329,6 +2329,11 @@ static int arm_smmu_device_remove(struct platform_device *pdev) ...@@ -2329,6 +2329,11 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
return 0; return 0;
} }
static void arm_smmu_device_shutdown(struct platform_device *pdev)
{
arm_smmu_device_remove(pdev);
}
static struct platform_driver arm_smmu_driver = { static struct platform_driver arm_smmu_driver = {
.driver = { .driver = {
.name = "arm-smmu", .name = "arm-smmu",
...@@ -2336,6 +2341,7 @@ static struct platform_driver arm_smmu_driver = { ...@@ -2336,6 +2341,7 @@ static struct platform_driver arm_smmu_driver = {
}, },
.probe = arm_smmu_device_probe, .probe = arm_smmu_device_probe,
.remove = arm_smmu_device_remove, .remove = arm_smmu_device_remove,
.shutdown = arm_smmu_device_shutdown,
}; };
module_platform_driver(arm_smmu_driver); module_platform_driver(arm_smmu_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment