Re: [PATCH v6 12/25] iommu: exynos: add support for runtime_pm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 04 May 2015 10:16:07 +0200 Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> wrote:

> This patch fixes support for runtime power management for SYSMMU
> controllers, so they are enabled when master device is attached.
> 

You should later think that this style of runtime PM support
will increase the leakage current because some devices may
enable System MMUs during they are not working.
If a device driver of a master device attaches its iommu domain
in probe, its local power will be never gated.

> Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> ---
>  drivers/iommu/exynos-iommu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
> index 598660c87410..734107ec78fa 100644
> --- a/drivers/iommu/exynos-iommu.c
> +++ b/drivers/iommu/exynos-iommu.c
> @@ -702,6 +702,7 @@ static int exynos_iommu_attach_device(struct iommu_domain *domain,
>  		return -ENODEV;
>  
>  	list_for_each_entry(data, &owner->clients, owner_node) {
> +		pm_runtime_get_sync(data->sysmmu);
>  		ret = __sysmmu_enable(data, pagetable, domain);
>  		if (ret >= 0) {
>  			data->master = dev;
> @@ -743,6 +744,7 @@ static void exynos_iommu_detach_device(struct iommu_domain *domain,
>  				data->master = NULL;
>  				list_del_init(&data->domain_node);
>  			}
> +			pm_runtime_put(data->sysmmu);
>  			found = true;
>  		}
>  	}
> -- 
> 1.9.2
> 


-- 
samsung.com <pullip.cho@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux