From patchwork Mon Aug 17 11:51:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 42009 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 n7HC64fN009166 for ; Mon, 17 Aug 2009 12:06:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757921AbZHQMFw (ORCPT ); Mon, 17 Aug 2009 08:05:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757929AbZHQMF3 (ORCPT ); Mon, 17 Aug 2009 08:05:29 -0400 Received: from smtp.nokia.com ([192.100.122.230]:23262 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757911AbZHQMFX (ORCPT ); Mon, 17 Aug 2009 08:05:23 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7HC58JI022864; Mon, 17 Aug 2009 15:05:14 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 17 Aug 2009 15:05:17 +0300 Received: from vaebe101.NOE.Nokia.com ([10.160.244.11]) by vaebh104.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 , Eero Nurkkala Subject: [PATCHv4 14/20] OMAP: McBSP: Let element DMA mode hit retention also Date: Mon, 17 Aug 2009 14:51:13 +0300 Message-Id: <1250509879-6703-15-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.0817 (UTC) FILETIME=[FAB06310: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: Eero Nurkkala The device no longer hits retention if element DMA mode is taken for at least the duration of the serial console timeout. Force element DMA mode to shut down through smartidle. Signed-off-by: Eero Nurkkala Acked-by: Eduardo Valentin --- arch/arm/plat-omap/mcbsp.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 56a5688..b63a720 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -343,6 +343,15 @@ static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp) syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03)); + /* + * HW bug workaround - If no_idle mode is taken, we need to + * go to smart_idle before going to always_idle, or the + * device will not hit retention anymore. + */ + syscon |= SIDLEMODE(0x02); + OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon); + + syscon &= ~(SIDLEMODE(0x03)); OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon); OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, 0);