From patchwork Wed Aug 17 23:10:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 1075222 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7HNCNva020605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Aug 2011 23:12:44 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QtpHM-0005BM-Km; Wed, 17 Aug 2011 23:12:08 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QtpHL-0000am-B6; Wed, 17 Aug 2011 23:12:07 +0000 Received: from mail-ww0-f49.google.com ([74.125.82.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QtpG8-0000HS-1w for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2011 23:10:53 +0000 Received: by mail-ww0-f49.google.com with SMTP id 10so1084424wwf.18 for ; Wed, 17 Aug 2011 16:10:51 -0700 (PDT) Received: by 10.227.143.203 with SMTP id w11mr1343224wbu.53.1313622651653; Wed, 17 Aug 2011 16:10:51 -0700 (PDT) Received: from localhost.localdomain (93-172-45-253.bb.netvision.net.il [93.172.45.253]) by mx.google.com with ESMTPS id el9sm1292103wbb.24.2011.08.17.16.10.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 17 Aug 2011 16:10:51 -0700 (PDT) From: Ohad Ben-Cohen To: Subject: [PATCH 6/7] omap: iommu: remove unused exported API Date: Thu, 18 Aug 2011 02:10:07 +0300 Message-Id: <1313622608-30397-7-git-send-email-ohad@wizery.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313622608-30397-1-git-send-email-ohad@wizery.com> References: <1313622608-30397-1-git-send-email-ohad@wizery.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110817_191052_334290_7D9CF88B X-CRM114-Status: GOOD ( 15.42 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] Cc: Ohad Ben-Cohen , Arnd Bergmann , Tony Lindgren , Joerg Roedel , Hiroshi DOYU , iommu@lists.linux-foundation.org, Laurent Pinchart , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 17 Aug 2011 23:12:44 +0000 (UTC) Remove unused public APIs from OMAP's iommu driver. IOMMU functionality should be exposed only via the generic IOMMU API; this way drivers stay generic, and different IOMMU drivers don't need to duplicate similar functionalities. The rest of the API still exposed by OMAP's iommu will be evaluated and eventually either added to the generic IOMMU API (if relevant), or completely removed. The intention is that OMAP's iommu driver will eventually not expose any public API. Signed-off-by: Ohad Ben-Cohen --- arch/arm/plat-omap/include/plat/iommu.h | 3 -- drivers/iommu/omap-iommu.c | 59 ------------------------------- 2 files changed, 0 insertions(+), 62 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 961b64f..eed5bdc 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -153,12 +153,9 @@ struct iommu_platform_data { extern u32 iommu_arch_version(void); extern void iotlb_cr_to_e(struct cr_regs *cr, struct iotlb_entry *e); -extern void iommu_set_twl(struct iommu *obj, bool on); -extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end); extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); -extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); extern int iommu_set_isr(const char *name, int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, void *priv), diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 7280e5b..d6b77c4 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -357,26 +357,6 @@ static void flush_iotlb_page(struct iommu *obj, u32 da) } /** - * flush_iotlb_range - Clear an iommu tlb entries - * @obj: target iommu - * @start: iommu device virtual address(start) - * @end: iommu device virtual address(end) - * - * Clear an iommu tlb entry which includes 'da' address. - **/ -void flush_iotlb_range(struct iommu *obj, u32 start, u32 end) -{ - u32 da = start; - - while (da < end) { - flush_iotlb_page(obj, da); - /* FIXME: Optimize for multiple page size */ - da += IOPTE_SIZE; - } -} -EXPORT_SYMBOL_GPL(flush_iotlb_range); - -/** * flush_iotlb_all - Clear all iommu tlb entries * @obj: target iommu **/ @@ -395,23 +375,6 @@ static void flush_iotlb_all(struct iommu *obj) clk_disable(obj->clk); } -/** - * iommu_set_twl - enable/disable table walking logic - * @obj: target iommu - * @on: enable/disable - * - * Function used to enable/disable TWL. If one wants to work - * exclusively with locked TLB entries and receive notifications - * for TLB miss then call this function to disable TWL. - */ -void iommu_set_twl(struct iommu *obj, bool on) -{ - clk_enable(obj->clk); - arch_iommu->set_twl(obj, on); - clk_disable(obj->clk); -} -EXPORT_SYMBOL_GPL(iommu_set_twl); - #if defined(CONFIG_OMAP_IOMMU_DEBUG_MODULE) ssize_t iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t bytes) @@ -848,28 +811,6 @@ static int device_match_by_alias(struct device *dev, void *data) } /** - * iommu_set_da_range - Set a valid device address range - * @obj: target iommu - * @start Start of valid range - * @end End of valid range - **/ -int iommu_set_da_range(struct iommu *obj, u32 start, u32 end) -{ - - if (!obj) - return -EFAULT; - - if (end < start || !PAGE_ALIGN(start | end)) - return -EINVAL; - - obj->da_start = start; - obj->da_end = end; - - return 0; -} -EXPORT_SYMBOL_GPL(iommu_set_da_range); - -/** * omap_find_iommu_device() - find an omap iommu device by name * @name: name of the iommu device *