From patchwork Thu Aug 8 09:40:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cho KyongHo X-Patchwork-Id: 2840971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6323E9F479 for ; Thu, 8 Aug 2013 10:30:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B6B120480 for ; Thu, 8 Aug 2013 10:30:02 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5946C204B5 for ; Thu, 8 Aug 2013 10:30:01 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7MiY-0003TZ-RS; Thu, 08 Aug 2013 09:41:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7MiG-0005De-SF; Thu, 08 Aug 2013 09:40:56 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Mht-00058L-Lz for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 09:40:35 +0000 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MR700FTLHIJ8T60@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 18:40:12 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.47]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 39.29.29708.C7763025; Thu, 08 Aug 2013 18:40:12 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-05-5203677c6fd5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id AF.78.32250.C7763025; Thu, 08 Aug 2013 18:40:12 +0900 (KST) Received: from DOPULLIPCHO07 ([12.23.118.94]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MR70037UHJ0XZ00@mmp1.samsung.com>; Thu, 08 Aug 2013 18:40:12 +0900 (KST) From: Cho KyongHo To: 'Linux ARM Kernel' , 'Linux IOMMU' , 'Linux Kernel' , 'Linux Samsung SOC' , devicetree@vger.kernel.org Subject: [PATCH v9 11/16] iommu/exynos: remove calls to Runtime PM API functions Date: Thu, 08 Aug 2013 18:40:12 +0900 Message-id: <002f01ce941b$47796910$d66c3b30$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac6UF6crUyZZ3JhpTr6Ox4P2C4gD8g== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHIsWRmVeSWpSXmKPExsVy+t8zfd2adOYggxNbtCzu3D3HajH/CJB4 deQHk8WC/dYWnbM3sFv0LrjKZvHx1HF2i02Pr7FaXN41h81ixvl9TBYXVmxkt5iy6DCrxck/ vYwWLdd7mRz4PJ4cnMfkMbvhIovHnWt72DzOb1rD7LF5Sb3H5BvLGT36tqxi9Pi8Sc7jytEz TAGcUVw2Kak5mWWpRfp2CVwZJ76rFKwUqTi/YC57A+MFgS5GTg4JAROJtv7jjBC2mMSFe+vZ uhi5OIQEljFKTF38jbmLkQOsaP/KcIj4IkaJiftPsIE0CAn8ZZTYNS8OxGYT0JJYPRdkEBeH iMBvRolbz+awgjjMAv+ZJLbebmI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vMTmNW+ZIU5SkNhx9jUjyKUiAnoS23bZQ5SISOx78Y5x AqPALCSTZiGZNAvJpFlIWhYwsqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECE4qz6R2MK5s sDjEKMDBqMTD2xHAFCTEmlhWXJl7iFGCg1lJhPdiMVCINyWxsiq1KD++qDQntfgQYzLQoxOZ pUST84EJL68k3tDYxMzI0sjMwsjE3Jw0YSVx3gOt1oFCAumJJanZqakFqUUwW5g4OKUaGFsZ +fadmnd5dYFm/5lWzkD9PdW8QbdbvndV2BupHfRZVzo9KcD8H3uMZMXpmSzbdFrrv8ouXKqU taq6qe5m1MqpE1cun/bK8ntH/YMr+owdst2z1y35c0FISGdjkt7xSv6OrfK7nikt539cy/40 +Qt3ScWKpmczO/cIddxqeLomRNl5onJ4gBJLcUaioRZzUXEiAHwZNMNuAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_054034_097972_B1E02608 X-CRM114-Status: GOOD ( 10.60 ) X-Spam-Score: -5.1 (-----) Cc: 'Kukjin Kim' , 'Prathyush' , 'Grant Grundler' , 'Joerg Roedel' , 'Subash Patel' , 'Sachin Kamat' , 'Antonios Motakis' , kvmarm@lists.cs.columbia.edu, 'Rahul Sharma' X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Runtime power management by exynos-iommu driver independently from master H/W's runtime pm is not useful for power saving since attaching master H/W in probing time turns on its local power endlessly. Thus this removes runtime pm API calls. Runtime PM support is added in the following commits to exynos-iommu driver. Signed-off-by: Cho KyongHo --- drivers/iommu/exynos-iommu.c | 20 -------------------- 1 files changed, 0 insertions(+), 20 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index e8f3e82..686e3c8 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -491,15 +491,8 @@ int exynos_sysmmu_enable(struct device *dev, unsigned long pgtable) BUG_ON(!memblock_is_memory(pgtable)); - ret = pm_runtime_get_sync(data->sysmmu); - if (ret < 0) { - dev_dbg(data->sysmmu, "Failed to enable\n"); - return ret; - } - ret = __exynos_sysmmu_enable(data, pgtable, NULL); if (WARN_ON(ret < 0)) { - pm_runtime_put(data->sysmmu); dev_err(data->sysmmu, "Already enabled with page table %#lx\n", data->pgtable); @@ -516,7 +509,6 @@ static bool exynos_sysmmu_disable(struct device *dev) bool disabled; disabled = __exynos_sysmmu_disable(data); - pm_runtime_put(data->sysmmu); return disabled; } @@ -626,8 +618,6 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev) } } - pm_runtime_enable(dev); - data->sysmmu = dev; data->clk = devm_clk_get(dev, "sysmmu"); if (IS_ERR(data->clk)) { @@ -759,12 +749,6 @@ static int exynos_iommu_attach_device(struct iommu_domain *domain, unsigned long flags; int ret; - ret = pm_runtime_get_sync(data->sysmmu); - if (ret < 0) - return ret; - - ret = 0; - spin_lock_irqsave(&priv->lock, flags); ret = __exynos_sysmmu_enable(data, __pa(priv->pgtable), domain); @@ -781,7 +765,6 @@ static int exynos_iommu_attach_device(struct iommu_domain *domain, if (ret < 0) { dev_err(dev, "%s: Failed to attach IOMMU with pgtable %#lx\n", __func__, __pa(priv->pgtable)); - pm_runtime_put(data->sysmmu); } else if (ret > 0) { dev_dbg(dev, "%s: IOMMU with pgtable 0x%lx already attached\n", __func__, __pa(priv->pgtable)); @@ -826,9 +809,6 @@ static void exynos_iommu_detach_device(struct iommu_domain *domain, finish: spin_unlock_irqrestore(&priv->lock, flags); - - if (found) - pm_runtime_put(data->sysmmu); } static unsigned long *alloc_lv2entry(unsigned long *sent, unsigned long iova,