From patchwork Fri Jul 24 17:22:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kanigeri, Hari" X-Patchwork-Id: 37155 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6OHLZcX032692 for ; Fri, 24 Jul 2009 17:22:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbZGXRWZ (ORCPT ); Fri, 24 Jul 2009 13:22:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752279AbZGXRWY (ORCPT ); Fri, 24 Jul 2009 13:22:24 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:37129 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752245AbZGXRWY (ORCPT ); Fri, 24 Jul 2009 13:22:24 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6OHMBum020650; Fri, 24 Jul 2009 12:22:16 -0500 Received: from dlep20.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n6OHMA5r013729; Fri, 24 Jul 2009 12:22:10 -0500 (CDT) Received: from dlee75.ent.ti.com (localhost [127.0.0.1]) by dlep20.itg.ti.com (8.12.11/8.12.11) with ESMTP id n6OHMA2a014391; Fri, 24 Jul 2009 12:22:10 -0500 (CDT) Received: from dlee03.ent.ti.com ([157.170.170.18]) by dlee75.ent.ti.com ([157.170.170.72]) with mapi; Fri, 24 Jul 2009 12:22:10 -0500 From: "Kanigeri, Hari" To: "tony@atomide.com" , Hiroshi DOYU CC: "linux-omap@vger.kernel.org" , "Gupta, Ramesh" , "rmk@arm.linux.org.uk" , "Pasam, Vijay" Date: Fri, 24 Jul 2009 12:22:09 -0500 Subject: [RFC][PATCH 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Thread-Topic: [RFC][PATCH 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Thread-Index: AcoMg0ZPok03TbE4Qaq2UZ2XxCmiVw== Message-ID: <8F7AF80515AF0D4D93307E594F3CB40E3A8CAD43@dlee03.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch has the changes to iommu module to make iommu functional on OMAP4 simulator. The changes included using stubbed clock interface and commenting out reading the MMU soft reset register. Signed-off-by: Hari Kanigeri --- arch/arm/mach-omap2/iommu2.c | 8 ++++++-- arch/arm/plat-omap/iommu.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 015f22a..01cb15d 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -80,12 +80,16 @@ static int omap2_iommu_enable(struct iommu *obj) if (l & MMU_SYS_RESETDONE) break; } while (time_after(jiffies, timeout)); - +/* FIXME: Hack till the reading the MMU status register + * is resolved in Simulator. Simulator doesn't update + * the STATUS register. + */ +#ifndef CONFIG_ARCH_OMAP4 if (!(l & MMU_SYS_RESETDONE)) { dev_err(obj->dev, "can't take mmu out of reset\n"); return -ENODEV; } - +#endif l = iommu_read_reg(obj, MMU_REVISION); dev_info(obj->dev, "%s: version %d.%d\n", obj->name, (l >> 4) & 0xf, l & 0xf); diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index 4cf449f..b62a087 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c @@ -861,9 +861,15 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev) if (!obj) return -ENOMEM; - obj->clk = clk_get(&pdev->dev, pdata->clk_name); - if (IS_ERR(obj->clk)) - goto err_clk; + /* + * FIX-ME: Replace with correct clk node when clk + * framework is available + */ + if (!cpu_is_omap44xx()) { + obj->clk = clk_get(&pdev->dev, pdata->clk_name); + if (IS_ERR(obj->clk)) + goto err_clk; + } obj->nr_tlb_entries = pdata->nr_tlb_entries; obj->name = pdata->name;