From patchwork Mon Aug 17 11:51:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 42005 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 n7HC64fJ009166 for ; Mon, 17 Aug 2009 12:06:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932535AbZHQMFp (ORCPT ); Mon, 17 Aug 2009 08:05:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932333AbZHQMFp (ORCPT ); Mon, 17 Aug 2009 08:05:45 -0400 Received: from smtp.nokia.com ([192.100.122.233]:17840 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757918AbZHQMF0 (ORCPT ); Mon, 17 Aug 2009 08:05:26 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7HC50UI010603; Mon, 17 Aug 2009 15:05:11 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 15:05:15 +0300 Received: from vaebe101.NOE.Nokia.com ([10.160.244.11]) by esebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 15:05:15 +0300 Received: from localhost.localdomain ([172.21.41.168]) by vaebe101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 15:05:14 +0300 From: Eduardo Valentin To: Takashi Iwai Cc: Linux-OMAP , ALSA-Devel , Jarkko Nikula , "Nurkkala Eero.An (EXT-Offcode/Oulu)" , "Ujfalusi Peter (Nokia-D/Tampere)" , Mark Brown , Eduardo Valentin Subject: [PATCHv4 12/20] OMAP: McBSP: Configure NO IDLE mode for DMA mode different of threshold Date: Mon, 17 Aug 2009 14:51:11 +0300 Message-Id: <1250509879-6703-13-git-send-email-eduardo.valentin@nokia.com> X-Mailer: git-send-email 1.6.2.GIT In-Reply-To: <1250509879-6703-1-git-send-email-eduardo.valentin@nokia.com> References: <1250509879-6703-1-git-send-email-eduardo.valentin@nokia.com> X-OriginalArrivalTime: 17 Aug 2009 12:05:14.0723 (UTC) FILETIME=[FAA20B30:01CA1F32] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Eduardo Valentin Use dma mode property to configure NO IDLE or SMART IDLE of McBSPs. Signed-off-by: Eduardo Valentin --- arch/arm/plat-omap/mcbsp.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 2c274e6..85176a5 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -317,7 +317,15 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp) syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03)); - syscon |= (ENAWAKEUP | SIDLEMODE(0x02) | CLOCKACTIVITY(0x02)); + + spin_lock_irq(&mcbsp->lock); + if (mcbsp->dma_op_mode == MCBSP_DMA_MODE_THRESHOLD) + syscon |= SIDLEMODE(0x02); + else + syscon |= SIDLEMODE(0x01); + spin_unlock_irq(&mcbsp->lock); + + syscon |= (ENAWAKEUP | CLOCKACTIVITY(0x02)); OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon); OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, XRDYEN | RRDYEN);