From: Eduardo Valentin Subject: [PATCH 15/20] OMAP: McBSP: Let element DMA mode hit retention also Date: Thu, 30 Jul 2009 15:49:38 +0300 Message-ID: <1248958183-15015-16-git-send-email-eduardo.valentin@nokia.com> References: <1248958183-15015-1-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-2-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-3-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-4-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-5-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-6-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-7-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-8-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-9-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-10-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-11-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-12-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-13-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-14-git-send-email-eduardo.valentin@nokia.com> <1248958183-15015-15-git-send-email-eduardo.valentin@nokia.com> Return-path: Received: from smtp.nokia.com ([192.100.122.233]:25926 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbZG3NBI (ORCPT ); Thu, 30 Jul 2009 09:01:08 -0400 In-Reply-To: <1248958183-15015-15-git-send-email-eduardo.valentin@nokia.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: linux-omap@vger.kernel.org, alsa-devel@vger.kernel.org Cc: Jarkko Nikula , "Nurkkala Eero.An (EXT-Offcode/Oulu)" , Peter Ujfalusi , Eero Nurkkala 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 3c6b98e..13f79c6 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -449,6 +449,15 @@ void omap_mcbsp_free(unsigned int id) 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); -- 1.6.2.GIT