From patchwork Mon Mar 9 07:05:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ext-eero.nurkkala@nokia.com X-Patchwork-Id: 10617 X-Patchwork-Delegate: tony@atomide.com 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 n2978TlH002202 for ; Mon, 9 Mar 2009 07:08:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbZCIHId (ORCPT ); Mon, 9 Mar 2009 03:08:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752002AbZCIHId (ORCPT ); Mon, 9 Mar 2009 03:08:33 -0400 Received: from smtp.nokia.com ([192.100.105.134]:61301 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbZCIHIc (ORCPT ); Mon, 9 Mar 2009 03:08:32 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n29778TR011084 for ; Mon, 9 Mar 2009 02:08:29 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Mar 2009 09:08:05 +0200 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Mar 2009 09:08:04 +0200 Received: from localhost.localdomain (ouped118146.nmp.nokia.com [172.23.118.146]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n29781rM015299; Mon, 9 Mar 2009 09:08:03 +0200 From: ext-eero.nurkkala@nokia.com To: linux-omap@vger.kernel.org Cc: Eero Nurkkala Subject: [PATCH 1/2] OMAP: McBSP: Always maintain McBSP fclk while active Date: Mon, 9 Mar 2009 09:05:11 +0200 Message-Id: <12365823142066-git-send-email-ext-eero.nurkkala@nokia.com> X-Mailer: git-send-email 1.5.2 In-Reply-To: <12365823123402-git-send-email-ext-eero.nurkkala@nokia.com> References: <12365823123402-git-send-email-ext-eero.nurkkala@nokia.com> X-OriginalArrivalTime: 09 Mar 2009 07:08:04.0798 (UTC) FILETIME=[CAA9A5E0:01C9A085] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Eero Nurkkala McBSP fclk must be maintained for the duration of audio playback or recording. Otherwise the fclk may get autogated when the PER96M clk is no longer required by other modules. This results in audio playback being hang. Fix this phenomenom by enabling the McBSP fclk clockactivity bit for the entire active duration of McBSP usage Signed-off-by: Eero Nurkkala --- arch/arm/plat-omap/include/mach/mcbsp.h | 1 + arch/arm/plat-omap/mcbsp.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index 26bde05..ec61b89 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h @@ -252,6 +252,7 @@ #define RDISABLE 0x0001 /********************** McBSP SYSCONFIG bit definitions ********************/ +#define CLOCKACTIVITY(value) ((value)<<8) #define SIDLEMODE(value) ((value)<<3) #define ENAWAKEUP 0x0004 #define SOFTRST 0x0002 diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index a94d03e..59850c2 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -248,8 +248,8 @@ int omap_mcbsp_request(unsigned int id) u16 w; w = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); - w &= ~(ENAWAKEUP | SIDLEMODE(0x03)); - w |= (ENAWAKEUP | SIDLEMODE(0x02)); + w &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03)); + w |= (ENAWAKEUP | SIDLEMODE(0x02) | CLOCKACTIVITY(0x01)); OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, w); OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, WAKEUPEN_ALL); @@ -308,7 +308,7 @@ void omap_mcbsp_free(unsigned int id) u16 w; w = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); - w &= ~(ENAWAKEUP | SIDLEMODE(0x03)); + w &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03)); OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, w); w = OMAP_MCBSP_READ(mcbsp->io_base, WAKEUPEN);