From patchwork Wed Nov 19 11:15:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 41141 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8EB1920CBB for ; Wed, 19 Nov 2014 11:16:48 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gd6sf256013lab.4 for ; Wed, 19 Nov 2014 03:16:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=r0d+hMtfjwkaTii1CP0R+0+kZnZU2kNbjsK3qLtO16c=; b=aIOv3iadZdiWqWHuJ7rn3ltER6SsVQB3iueFx9duGK4pnsVAdGEInXLjIhJTD9Quv1 hxAkZyvH4DkGoY489xOhqWyZe8bkja857viBpw0p/US7YbVxSFcVjU8mN6yTdESTh9XC ilFjMQRipG6xneAKDf4w6Wxxr+xoNv1T/tc1wiaq9eanbmYjkNXwDHFWafkZHp8LrhKN qqmIQdnngCvUtXgBpumqHF1Dh9YG1AWy4ZFXwhhBVTJzXRGhBHharqOTGJhQRmuoqrTG wo85KVCKpPrcV8PPJotlUI5OI2aXFiuIlkVVXhk2rweJLsAWNitWqe4I4qYzoL6SXETq G29g== X-Gm-Message-State: ALoCoQmN+wumMW5cgHT9DdVxBXx1xWmclJ4vB1ovsZWlfBWYzpbkJweOa7Sdh5A9/M+bZyseg03o X-Received: by 10.112.199.167 with SMTP id jl7mr4725645lbc.5.1416395807529; Wed, 19 Nov 2014 03:16:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.4 with SMTP id ky4ls1462309lab.23.gmail; Wed, 19 Nov 2014 03:16:47 -0800 (PST) X-Received: by 10.112.168.97 with SMTP id zv1mr42013288lbb.6.1416395807302; Wed, 19 Nov 2014 03:16:47 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id rs2si1437838lbb.91.2014.11.19.03.16.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 03:16:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id n15so295369lbi.6 for ; Wed, 19 Nov 2014 03:16:47 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr4758978laa.71.1416395807226; Wed, 19 Nov 2014 03:16:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp64313lbc; Wed, 19 Nov 2014 03:16:46 -0800 (PST) X-Received: by 10.68.203.195 with SMTP id ks3mr10473010pbc.104.1416395801976; Wed, 19 Nov 2014 03:16:41 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xo9si2087857pbc.210.2014.11.19.03.16.41 for ; Wed, 19 Nov 2014 03:16:41 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754775AbaKSLQf (ORCPT + 4 others); Wed, 19 Nov 2014 06:16:35 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:25021 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754356AbaKSLQe (ORCPT ); Wed, 19 Nov 2014 06:16:34 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFA00LOHA4EIR40@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 19 Nov 2014 11:19:26 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-dc-546c7c10b740 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 17.B2.24279.01C7C645; Wed, 19 Nov 2014 11:16:32 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NFA00GC59YMTL30@eusync1.samsung.com>; Wed, 19 Nov 2014 11:16:32 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v3 14/19] iommu: exynos: add support for runtime_pm Date: Wed, 19 Nov 2014 12:15:43 +0100 Message-id: <1416395748-10731-15-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsVy+t/xy7oCNTkhBpM61Cz+TjrGbjFx5WRm i0n3J7BYLNhvbdE5ewO7Re+Cq2wWZ5vesFt0TlzCbvHlykMmi02Pr7FazDi/j8li7ZG77Ban rn9ms/jXe5DR4v+eHewWRx7uZrdYtesPo8Xt33wWLz+eYHEQ9nhycB6Tx5p5axg9fv+axOix c9Zddo/ZHTNZPTav0PLYtKqTzWPzknqP2/8eM3tMvrGc0ePKiSZWj97md2wefVtWMXp83iQX wBfFZZOSmpNZllqkb5fAlfFu6mHmgk/sFTMfWjUwHmDrYuTkkBAwkVj+4SgrhC0mceHeeqA4 F4eQwFJGiRN/57JDOH1MEv+//mcGqWITMJToetsF1i0ikC/xYu9fFhCbWeANi8S9TYYgtrCA s8SbU4vZQWwWAVWJWZe2gfXyCnhKHNz5lwlim5zE/5crgGwODk6g+PUXYGOEBDwkmqavY53A yLuAkWEVo2hqaXJBcVJ6rpFecWJucWleul5yfu4mRkh0fN3BuPSY1SFGAQ5GJR7ehuKcECHW xLLiytxDjBIczEoivMWFQCHelMTKqtSi/Pii0pzU4kOMTBycUg2M0wUD0u/8cirfxto/MevD FsY/DIf/r+LnlUlkmdd434H1iFEAV+Cfqra1cSffJVUV17rK2R7MY6ndZ8YaZhC/63b9Ag12 k7TVafvt5t256ciRs/HuDvfDq+Vmf5sdHJnY9d5kKsc6rY+2j+R332j+72qRvYypf6/9Gb6G Ft6DZ7xKD/rMj92ixFKckWioxVxUnAgAACq48WwCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes support for runtime power management for SYSMMU controllers, so they are enabled when master device is attached. Signed-off-by: Marek Szyprowski --- 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 77dec32c59ef..27742c4d5a76 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -696,6 +696,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; @@ -737,6 +738,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; } }