From patchwork Sun Dec 16 17:25:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1885231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id BC0B1DFAC4 for ; Sun, 16 Dec 2012 17:30:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TkHzl-00064L-88; Sun, 16 Dec 2012 17:27:21 +0000 Received: from perceval.ideasonboard.com ([95.142.166.194]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TkHxd-00058z-OC for linux-arm-kernel@lists.infradead.org; Sun, 16 Dec 2012 17:25:10 +0000 Received: from avalon.quadriga.com (unknown [194.136.87.226]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0234035A89; Sun, 16 Dec 2012 18:24:57 +0100 (CET) From: Laurent Pinchart To: Hideki EIRAKU Subject: [PATCH/WIP/RFC 09/14] shmobile-ipmmu: Rename ipmmu_priv to shmobile_ipmmu Date: Sun, 16 Dec 2012 18:25:55 +0100 Message-Id: <1355678760-27357-10-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1355678760-27357-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1350290093-998-1-git-send-email-hdk@igel.co.jp> <1355678760-27357-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121216_122509_982155_FF37C03A X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Katsuya MATSUBARA , Simon Horman , linux-sh@vger.kernel.org, Magnus Damm , linux-kernel@vger.kernel.org, Paul Mundt , Damian Hobson-Garcia , linux-arm-kernel@lists.infradead.org, Marek Szyprowski 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 And expose the structure to the IOMMU driver. Signed-off-by: Laurent Pinchart --- drivers/iommu/shmobile-ipmmu.c | 14 ++++---------- drivers/iommu/shmobile-ipmmu.h | 6 ++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers/iommu/shmobile-ipmmu.c index 34e3c66..b308292 100644 --- a/drivers/iommu/shmobile-ipmmu.c +++ b/drivers/iommu/shmobile-ipmmu.c @@ -34,13 +34,7 @@ #define IMCTR1_TLBEN (1 << 0) #define IMCTR1_FLUSH (1 << 1) -struct ipmmu_priv { - void __iomem *ipmmu_base; - int tlb_enabled; - struct mutex flush_lock; -}; - -static void ipmmu_reg_write(struct ipmmu_priv *priv, unsigned long reg_off, +static void ipmmu_reg_write(struct shmobile_ipmmu *priv, unsigned long reg_off, unsigned long data) { iowrite32(data, priv->ipmmu_base + reg_off); @@ -48,7 +42,7 @@ static void ipmmu_reg_write(struct ipmmu_priv *priv, unsigned long reg_off, void ipmmu_tlb_flush(struct device *dev) { - struct ipmmu_priv *priv; + struct shmobile_ipmmu *priv; if (!dev) return; @@ -63,7 +57,7 @@ void ipmmu_tlb_flush(struct device *dev) void ipmmu_tlb_set(struct device *dev, unsigned long phys, int size, int asid) { - struct ipmmu_priv *priv; + struct shmobile_ipmmu *priv; if (!dev) return; @@ -110,7 +104,7 @@ void ipmmu_tlb_set(struct device *dev, unsigned long phys, int size, int asid) static int ipmmu_probe(struct platform_device *pdev) { struct resource *res; - struct ipmmu_priv *priv; + struct shmobile_ipmmu *priv; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { diff --git a/drivers/iommu/shmobile-ipmmu.h b/drivers/iommu/shmobile-ipmmu.h index 0e0a6a4..5c17a46 100644 --- a/drivers/iommu/shmobile-ipmmu.h +++ b/drivers/iommu/shmobile-ipmmu.h @@ -1,6 +1,12 @@ #ifndef __SHMOBILE_IPMMU_H__ #define __SHMOBILE_IPMMU_H__ +struct shmobile_ipmmu { + void __iomem *ipmmu_base; + int tlb_enabled; + struct mutex flush_lock; +}; + #ifdef CONFIG_SHMOBILE_IPMMU_TLB void ipmmu_tlb_flush(struct device *ipmmu_dev); void ipmmu_tlb_set(struct device *ipmmu_dev, unsigned long phys, int size,