From patchwork Tue Nov 20 01:05:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Ramirez Luna X-Patchwork-Id: 1770071 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 24DCB3FCDE for ; Tue, 20 Nov 2012 01:08:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TacIL-0007GI-9l; Tue, 20 Nov 2012 01:06:33 +0000 Received: from mail-oa0-f49.google.com ([209.85.219.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TacHz-0007D0-0N for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2012 01:06:11 +0000 Received: by mail-oa0-f49.google.com with SMTP id l10so5333181oag.36 for ; Mon, 19 Nov 2012 17:06:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=iD1ILQQvtL/4lMMazP6ONUI4NVPItW9/slqqYFm8pwk=; b=jXM+AIoEa9wmXyv0hGCOBDtZ829TLksn+m2X86R7debaJvB43XPVEmoETOfDL0o+Aa 5Pg5xD9wtw/HuXvLdJvipGBjgbq8zbLn8f+FLeyTlCxqa7ewiGYk10WNgQQ0lxJkYDoC hBoMVDQDv0aef6TRyihCkJNMkZGsKXFYMetFrQI+/xCpby6zbMF4z/8U7qn547IeVVTB xPIOr/nLVlOCFidcsi/rdEwdUWLQa68JMigFegrxXWWwN8ERoRCwPqftqSYstbNaXJKw dt2qBP0YiNGqvU77suhwud3FxSl5lF+gsKKmbYZJr/TQX/43WPT0bUYvv22CS/bLBVkL epTA== Received: by 10.182.78.137 with SMTP id b9mr12099114obx.94.1353373570822; Mon, 19 Nov 2012 17:06:10 -0800 (PST) Received: from localhost.localdomain (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id vt9sm11578237obb.3.2012.11.19.17.06.09 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 17:06:10 -0800 (PST) From: Omar Ramirez Luna To: Tony Lindgren , Joerg Roedel Subject: [PATCH v5 2/5] iommu/omap: keep mmu enabled when requested Date: Mon, 19 Nov 2012 19:05:49 -0600 Message-Id: <1353373552-16039-3-git-send-email-omar.luna@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353373552-16039-1-git-send-email-omar.luna@linaro.org> References: <1353373552-16039-1-git-send-email-omar.luna@linaro.org> X-Gm-Message-State: ALoCoQkOHZjMkai7FjL62NkO4PCtrODDfnmsI8NQ8+P0G2nOreOHHU0MRaWcg/V0pGASg1EKP3q9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121119_200611_206702_72D83086 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.219.49 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Ohad Ben-Cohen , Paul Walmsley , Russell King , Mauro Carvalho Chehab , Felipe Contreras , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Omar Ramirez Luna , linux-omap@vger.kernel.org, Ido Yariv , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The purpose of the mmu is to handle the memory accesses requested by its users. Typically, the mmu is bundled with the processing unit in a single IP block, which makes them to share the same clock to be functional. Currently, iommu code assumes that its user will be indirectly clocking it, but being a separate mmu driver, it should handle its own clocks, so as long as the mmu is requested it will be powered ON and once detached it will be powered OFF. The remaining clock handling out of iommu_enable and iommu_disable corresponds to paths that can be accessed through debugfs, some of them doesn't work if the module is not enabled first, but in future if the mmu is idled withouth freeing, these are needed to debug. Signed-off-by: Omar Ramirez Luna --- drivers/iommu/omap-iommu.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 6b1288c..f8082da 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -154,7 +154,6 @@ static int iommu_enable(struct omap_iommu *obj) err = arch_iommu->enable(obj); - clk_disable(obj->clk); return err; } @@ -163,8 +162,6 @@ static void iommu_disable(struct omap_iommu *obj) if (!obj) return; - clk_enable(obj->clk); - arch_iommu->disable(obj); clk_disable(obj->clk);