From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kukjin Kim Subject: Re: [PATCH 1/2] iommu/exynos: fix runtime pm support Date: Sat, 12 May 2012 06:31:59 +0900 Message-ID: <4FAD854F.7040403@samsung.com> References: <1334154871-4756-1-git-send-email-m.szyprowski@samsung.com> <1334154871-4756-2-git-send-email-m.szyprowski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334154871-4756-2-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Marek Szyprowski Cc: Kukjin Kim , Kyungmin Park , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, KyongHo Cho , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On 04/11/12 23:34, Marek Szyprowski wrote: > Fix registration to runtime pw and add missing resume callback. > > Signed-off-by: Marek Szyprowski > Acked-by: Kyungmin Park > --- > drivers/iommu/exynos-iommu.c | 20 ++++++++++++++++++-- > 1 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c > index b8daf7c..eef924d 100644 > --- a/drivers/iommu/exynos-iommu.c > +++ b/drivers/iommu/exynos-iommu.c > @@ -651,8 +651,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) > > __set_fault_handler(data,&default_fault_handler); > > - if (dev->parent) > - pm_runtime_enable(dev); > + pm_runtime_enable(dev); > > dev_dbg(dev, "(%s) Initialized\n", data->dbgname); > return 0; > @@ -674,11 +673,28 @@ err_alloc: > return ret; > } > > +static int exynos_pm_resume(struct device *dev) > +{ > + struct sysmmu_drvdata *data; > + > + data = dev_get_drvdata(dev); > + > + if (is_sysmmu_active(data)) > + __exynos_sysmmu_enable(data, data->pgtable, NULL); > + > + return 0; > +} > + > +const struct dev_pm_ops exynos_pm_ops = { > + .resume =&exynos_pm_resume, > +}; > + > static struct platform_driver exynos_sysmmu_driver = { > .probe = exynos_sysmmu_probe, > .driver = { > .owner = THIS_MODULE, > .name = "exynos-sysmmu", > + .pm =&exynos_pm_ops, > } > }; > Joerg, This patch is needed to correct run-time pm for EXYNOS SoCs with System MMU after KyongHo's iommu/exynos patch. So if you're ok on this, let me apply this in samsung tree. Thanks. Best regards, Kgene. -- Kukjin Kim , Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. From mboxrd@z Thu Jan 1 00:00:00 1970 From: kgene.kim@samsung.com (Kukjin Kim) Date: Sat, 12 May 2012 06:31:59 +0900 Subject: [PATCH 1/2] iommu/exynos: fix runtime pm support In-Reply-To: <1334154871-4756-2-git-send-email-m.szyprowski@samsung.com> References: <1334154871-4756-1-git-send-email-m.szyprowski@samsung.com> <1334154871-4756-2-git-send-email-m.szyprowski@samsung.com> Message-ID: <4FAD854F.7040403@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 04/11/12 23:34, Marek Szyprowski wrote: > Fix registration to runtime pw and add missing resume callback. > > Signed-off-by: Marek Szyprowski > Acked-by: Kyungmin Park > --- > drivers/iommu/exynos-iommu.c | 20 ++++++++++++++++++-- > 1 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c > index b8daf7c..eef924d 100644 > --- a/drivers/iommu/exynos-iommu.c > +++ b/drivers/iommu/exynos-iommu.c > @@ -651,8 +651,7 @@ static int exynos_sysmmu_probe(struct platform_device *pdev) > > __set_fault_handler(data,&default_fault_handler); > > - if (dev->parent) > - pm_runtime_enable(dev); > + pm_runtime_enable(dev); > > dev_dbg(dev, "(%s) Initialized\n", data->dbgname); > return 0; > @@ -674,11 +673,28 @@ err_alloc: > return ret; > } > > +static int exynos_pm_resume(struct device *dev) > +{ > + struct sysmmu_drvdata *data; > + > + data = dev_get_drvdata(dev); > + > + if (is_sysmmu_active(data)) > + __exynos_sysmmu_enable(data, data->pgtable, NULL); > + > + return 0; > +} > + > +const struct dev_pm_ops exynos_pm_ops = { > + .resume =&exynos_pm_resume, > +}; > + > static struct platform_driver exynos_sysmmu_driver = { > .probe = exynos_sysmmu_probe, > .driver = { > .owner = THIS_MODULE, > .name = "exynos-sysmmu", > + .pm =&exynos_pm_ops, > } > }; > Joerg, This patch is needed to correct run-time pm for EXYNOS SoCs with System MMU after KyongHo's iommu/exynos patch. So if you're ok on this, let me apply this in samsung tree. Thanks. Best regards, Kgene. -- Kukjin Kim , Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.