From patchwork Fri Dec 18 08:58:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 68641 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI8wmjU005424 for ; Fri, 18 Dec 2009 08:58:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751054AbZLRI6q (ORCPT ); Fri, 18 Dec 2009 03:58:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751046AbZLRI6q (ORCPT ); Fri, 18 Dec 2009 03:58:46 -0500 Received: from smtp.nokia.com ([192.100.122.233]:27411 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbZLRI6p (ORCPT ); Fri, 18 Dec 2009 03:58:45 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nBI8wfL3019314; Fri, 18 Dec 2009 10:58:41 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Dec 2009 10:58:40 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Dec 2009 10:58:40 +0200 Received: from localhost.localdomain (esdhcp04366.research.nokia.com [172.21.43.66]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nBI8wcAc024206; Fri, 18 Dec 2009 10:58:38 +0200 From: Eduardo Valentin To: Kevin Hilman Cc: Kristo Tero , Balbi Felipe , Gadiyar Anand , , Eduardo Valentin Subject: [PATCH 1/1] OMAP3: PM: Fix OTG autoidle workaround Date: Fri, 18 Dec 2009 10:58:30 +0200 Message-Id: <1261126710-25459-1-git-send-email-eduardo.valentin@nokia.com> X-Mailer: git-send-email 1.6.5.7.g9ecb2 In-Reply-To: <20091218080832.GA2858@esdhcp037198.research.nokia.com> References: <20091218080832.GA2858@esdhcp037198.research.nokia.com> X-OriginalArrivalTime: 18 Dec 2009 08:58:40.0204 (UTC) FILETIME=[4AFD40C0:01CA7FC0] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index c301261..db75975 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -505,7 +505,8 @@ void omap_sram_idle(void) * Errata 1.164 fix : OTG autoidle can prevent * sleep */ - usb_musb_disable_autoidle(); + if (cpu_is_omap34xx()) + usb_musb_disable_autoidle(); } omap_uart_resume_idle(0); omap_uart_resume_idle(1); diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index bb3cee4..cbd4e45 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c @@ -81,7 +81,14 @@ static void __init usb_musb_pm_init(void) void usb_musb_disable_autoidle(void) { - __raw_writel(0, otg_base + OTG_SYSCONFIG); + if (otg_clk) { + unsigned long reg; + + clk_enable(otg_clk); + reg = __raw_readl(otg_base + OTG_SYSCONFIG); + __raw_writel(reg & ~1, otg_base + OTG_SYSCONFIG); + clk_disable(otg_clk); + } } #ifdef CONFIG_USB_MUSB_SOC