iommu/rockchip: Prohibit unbind and remove
Removal of IOMMUs cannot be done reliably. This is similar to exynos iommu driver. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
1a4e90f25b
commit
98b72b94de
@ -1197,18 +1197,6 @@ static int rk_iommu_probe(struct platform_device *pdev)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rk_iommu_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct rk_iommu *iommu = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
if (iommu) {
|
|
||||||
iommu_device_sysfs_remove(&iommu->iommu);
|
|
||||||
iommu_device_unregister(&iommu->iommu);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rk_iommu_shutdown(struct platform_device *pdev)
|
static void rk_iommu_shutdown(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct rk_iommu *iommu = platform_get_drvdata(pdev);
|
struct rk_iommu *iommu = platform_get_drvdata(pdev);
|
||||||
@ -1234,11 +1222,11 @@ MODULE_DEVICE_TABLE(of, rk_iommu_dt_ids);
|
|||||||
|
|
||||||
static struct platform_driver rk_iommu_driver = {
|
static struct platform_driver rk_iommu_driver = {
|
||||||
.probe = rk_iommu_probe,
|
.probe = rk_iommu_probe,
|
||||||
.remove = rk_iommu_remove,
|
|
||||||
.shutdown = rk_iommu_shutdown,
|
.shutdown = rk_iommu_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "rk_iommu",
|
.name = "rk_iommu",
|
||||||
.of_match_table = rk_iommu_dt_ids,
|
.of_match_table = rk_iommu_dt_ids,
|
||||||
|
.suppress_bind_attrs = true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1266,14 +1254,7 @@ static int __init rk_iommu_init(void)
|
|||||||
platform_driver_unregister(&rk_iommu_domain_driver);
|
platform_driver_unregister(&rk_iommu_domain_driver);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
static void __exit rk_iommu_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&rk_iommu_driver);
|
|
||||||
platform_driver_unregister(&rk_iommu_domain_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
subsys_initcall(rk_iommu_init);
|
subsys_initcall(rk_iommu_init);
|
||||||
module_exit(rk_iommu_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("IOMMU API for Rockchip");
|
MODULE_DESCRIPTION("IOMMU API for Rockchip");
|
||||||
MODULE_AUTHOR("Simon Xue <xxm@rock-chips.com> and Daniel Kurtz <djkurtz@chromium.org>");
|
MODULE_AUTHOR("Simon Xue <xxm@rock-chips.com> and Daniel Kurtz <djkurtz@chromium.org>");
|
||||||
|
Loading…
Reference in New Issue
Block a user