diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2013-08-07 11:03:17 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:44:06 +0900 |
commit | 8f00ff738c11cfe2fdef11171d7d59c55105256f (patch) | |
tree | 580e260c55c38322b413993c9ba08f6d4b0c5961 /drivers | |
parent | 866f5f92b841f3a47aeca664cb271d21104ecf03 (diff) | |
download | linux-3.10-8f00ff738c11cfe2fdef11171d7d59c55105256f.tar.gz linux-3.10-8f00ff738c11cfe2fdef11171d7d59c55105256f.tar.bz2 linux-3.10-8f00ff738c11cfe2fdef11171d7d59c55105256f.zip |
iommu/exynos: add dummy driver for enabling runtime pm for mem port devices
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/exynos-iommu.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 01d1c622f6a..76f423d34f7 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1319,3 +1319,37 @@ static int __init exynos_iommu_init(void) return ret; } arch_initcall(exynos_iommu_init); + +/* + * Dummy driver to enable runtime power management for memport + * devices, which required for correct Exynos SYSMMU operation. + * Must be registered before drivers, which will use memport nodes. + */ +static int __init exynos_memport_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + pm_runtime_enable(dev); + return 0; +} + +#ifdef CONFIG_OF +static struct of_device_id memport_of_match[] __initconst = { + { .compatible = "samsung,memport", }, + { }, +}; +#endif + +static struct platform_driver exynos_memport_driver __refdata = { + .probe = exynos_memport_probe, + .driver = { + .owner = THIS_MODULE, + .name = "exynos-memport", + .of_match_table = of_match_ptr(memport_of_match), + } +}; + +static int __init exynos_memport_init(void) +{ + return platform_driver_register(&exynos_memport_driver); +} +subsys_initcall(exynos_memport_init); |