From patchwork Tue Aug 4 22:30:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kanigeri, Hari" X-Patchwork-Id: 39246 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 n74MU2Bk004012 for ; Tue, 4 Aug 2009 22:30:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751692AbZHDWaq (ORCPT ); Tue, 4 Aug 2009 18:30:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754867AbZHDWaq (ORCPT ); Tue, 4 Aug 2009 18:30:46 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38064 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692AbZHDWap (ORCPT ); Tue, 4 Aug 2009 18:30:45 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n74MUPFk025717; Tue, 4 Aug 2009 17:30:30 -0500 Received: from dlep20.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n74MUPGZ022507; Tue, 4 Aug 2009 17:30:25 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep20.itg.ti.com (8.12.11/8.12.11) with ESMTP id n74MUPup013855; Tue, 4 Aug 2009 17:30:25 -0500 (CDT) Received: from dlee03.ent.ti.com ([157.170.170.18]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Tue, 4 Aug 2009 17:30:25 -0500 From: "Kanigeri, Hari" To: "linux-omap@vger.kernel.org" , "tony@atomide.com" CC: Hiroshi DOYU , "linux@arm.linux.org.uk" , "Shilimkar, Santosh" Date: Tue, 4 Aug 2009 17:30:23 -0500 Subject: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Thread-Topic: [PATCH v1 1/3] ARM:OMAP4 iommu:changes in iommu for OMAP4 Thread-Index: AcoVUyhHJQtPtkoTQcqvY0Be7YqTMw== Message-ID: <8F7AF80515AF0D4D93307E594F3CB40E3ABDBABD@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, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index 015f22a..30b7158 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -80,12 +80,14 @@ static int omap2_iommu_enable(struct iommu *obj) if (l & MMU_SYS_RESETDONE) break; } while (time_after(jiffies, timeout)); - - if (!(l & MMU_SYS_RESETDONE)) { + /* FIXME: Hack till the reading the MMU status register + * is resolved in Simulator. Simulator doesn't update + * the STATUS register. + */ + if (!cpu_is_omap44xx() && !(l & MMU_SYS_RESETDONE)) { dev_err(obj->dev, "can't take mmu out of reset\n"); return -ENODEV; } - 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;