From patchwork Sun Dec 16 17:25:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1885211 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 88F76DFAC4 for ; Sun, 16 Dec 2012 17:29:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TkHzF-0005hG-7e; Sun, 16 Dec 2012 17:26:49 +0000 Received: from perceval.ideasonboard.com ([95.142.166.194]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TkHxZ-00058N-FP for linux-arm-kernel@lists.infradead.org; Sun, 16 Dec 2012 17:25:08 +0000 Received: from avalon.quadriga.com (unknown [194.136.87.226]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9215835A87; Sun, 16 Dec 2012 18:24:56 +0100 (CET) From: Laurent Pinchart To: Hideki EIRAKU Subject: [PATCH/WIP/RFC 07/14] shmobile-iommu: Move header file from arch/ to drivers/iommu/ Date: Sun, 16 Dec 2012 18:25:53 +0100 Message-Id: <1355678760-27357-8-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_122505_928058_DEF0AACA X-CRM114-Status: GOOD ( 10.32 ) 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 split the function used by board code to its own include/linux/sh_iommu.h header. Signed-off-by: Laurent Pinchart --- arch/arm/mach-shmobile/board-ap4evb.c | 2 +- arch/arm/mach-shmobile/board-mackerel.c | 2 +- arch/arm/mach-shmobile/setup-sh7372.c | 2 +- drivers/iommu/shmobile-iommu.c | 4 +++- drivers/iommu/shmobile-ipmmu.c | 3 ++- .../mach/ipmmu.h => drivers/iommu/shmobile-ipmmu.h | 5 ----- include/linux/sh_iommu.h | 12 ++++++++++++ 7 files changed, 20 insertions(+), 10 deletions(-) rename arch/arm/mach-shmobile/include/mach/ipmmu.h => drivers/iommu/shmobile-ipmmu.h (78%) create mode 100644 include/linux/sh_iommu.h diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 7006abb..0c40d72 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -61,7 +62,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 1c34520..a9cdfc2 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -60,7 +61,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index aadb769..5dd3576 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/iommu/shmobile-iommu.c b/drivers/iommu/shmobile-iommu.c index 9f2243e3..463da32 100644 --- a/drivers/iommu/shmobile-iommu.c +++ b/drivers/iommu/shmobile-iommu.c @@ -23,8 +23,10 @@ #include #include #include +#include #include -#include + +#include "shmobile-ipmmu.h" #define L1_SIZE CONFIG_SHMOBILE_IOMMU_L1SIZE #define L1_LEN (L1_SIZE / 4) diff --git a/drivers/iommu/shmobile-ipmmu.c b/drivers/iommu/shmobile-ipmmu.c index edec3b8..34e3c66 100644 --- a/drivers/iommu/shmobile-ipmmu.c +++ b/drivers/iommu/shmobile-ipmmu.c @@ -22,7 +22,8 @@ #include #include #include -#include + +#include "shmobile-ipmmu.h" #define IMCTR1 0x000 #define IMCTR2 0x004 diff --git a/arch/arm/mach-shmobile/include/mach/ipmmu.h b/drivers/iommu/shmobile-ipmmu.h similarity index 78% rename from arch/arm/mach-shmobile/include/mach/ipmmu.h rename to drivers/iommu/shmobile-ipmmu.h index 4b805b1f..0e0a6a4 100644 --- a/arch/arm/mach-shmobile/include/mach/ipmmu.h +++ b/drivers/iommu/shmobile-ipmmu.h @@ -5,13 +5,8 @@ void ipmmu_tlb_flush(struct device *ipmmu_dev); void ipmmu_tlb_set(struct device *ipmmu_dev, unsigned long phys, int size, int asid); -void ipmmu_add_device(struct device *dev); int ipmmu_iommu_init(struct device *dev); #else -static inline void ipmmu_add_device(struct device *dev) -{ -} - static int ipmmu_iommu_init(struct device *dev) { return -EINVAL; diff --git a/include/linux/sh_iommu.h b/include/linux/sh_iommu.h new file mode 100644 index 0000000..cc669a0 --- /dev/null +++ b/include/linux/sh_iommu.h @@ -0,0 +1,12 @@ +#ifndef __SH_IOMMU_H__ +#define __SH_IOMMU_H__ + +#ifdef CONFIG_SHMOBILE_IPMMU_TLB +void ipmmu_add_device(struct device *dev); +#else +static inline void ipmmu_add_device(struct device *dev) +{ +} +#endif + +#endif /* __SH_IOMMU_H__ */