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: 1769971 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E117F4005F for ; Tue, 20 Nov 2012 01:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753962Ab2KTBGN (ORCPT ); Mon, 19 Nov 2012 20:06:13 -0500 Received: from mail-oa0-f46.google.com ([209.85.219.46]:64879 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753950Ab2KTBGL (ORCPT ); Mon, 19 Nov 2012 20:06:11 -0500 Received: by mail-oa0-f46.google.com with SMTP id h16so5451881oag.19 for ; Mon, 19 Nov 2012 17:06:11 -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=ZDOGXPLNjsC4HGsKmDJ6rli+GxPVwW/PRDdp4g9DGYtKtNjGmV2bleZuZhmPtzEq4f rNV0PabN3wKBkU8Dai4MzTLZ+W0RiKz1AmVg2x4WhikO9wenCC4P6qGBGzwBm42T66sD PYbZJr7Wlb+liSaJW8c+fNjgHY6XJp6dH2yXVHYLBLCDKLLRaRl/W8PPJ9rs3eqRlP43 1EfGpa4yXk3i36Y0gzdIgkFZ2p5VMYGVtkwOKxDVo+i0k3AkVIIqwwDGDRld0kfTsmFZ M3N+ak2eKnVneVYQl2n4aFd0TelnFKqugqwaJybjzZ3wcLV1lLT8mYcIaeWOV7YueglR XyxA== 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 Cc: Russell King , Ohad Ben-Cohen , Omar Ramirez Luna , Ido Yariv , Mauro Carvalho Chehab , Paul Walmsley , Felipe Contreras , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org 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: ALoCoQliqIZdo4RkZKXoVt5XbEw7U/iv7UD/Rfmr/JdZNRLsfNWZO0r1a2kqt2I3PVW36ZRfUVJ/ Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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);