From: Eduardo Valentin Subject: [PATCHv2 14/20] OMAP: McBSP: Let element DMA mode hit retention also Date: Tue, 11 Aug 2009 16:05:25 +0300 Message-ID: <1249995931-26015-15-git-send-email-eduardo.valentin@nokia.com> References: <1249995931-26015-1-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-2-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-3-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-4-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-5-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-6-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-7-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-8-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-9-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-10-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-11-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-12-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-13-git-send-email-eduardo.valentin@nokia.com> <1249995931-26015-14-git-send-email-eduardo.valentin@nokia.com> Return-path: Received: from smtp.nokia.com ([192.100.122.230]:47840 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463AbZHKNSl (ORCPT ); Tue, 11 Aug 2009 09:18:41 -0400 In-Reply-To: <1249995931-26015-14-git-send-email-eduardo.valentin@nokia.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Linux-OMAP , ALSA-Devel Cc: Jarkko Nikula , "Nurkkala Eero.An (EXT-Offcode/Oulu)" , "\\\"Ujfalusi Peter (Nokia-D/Tampere)\\\"" , 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 208f422..50a9fea 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); -- 1.6.2.GIT