OMAP: McBSP: Retain McBSP FCLK clockactivity
authorEero Nurkkala <ext-eero.nurkkala@nokia.com>
Thu, 20 Aug 2009 13:18:17 +0000 (16:18 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 20 Aug 2009 19:10:27 +0000 (20:10 +0100)
FCLK may get autogated so that it prevents the McBSP
to work properly. It is the bit 9 that must be set
for maintaining the McBSP FCLK.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
arch/arm/plat-omap/include/mach/mcbsp.h
arch/arm/plat-omap/mcbsp.c

index fe10ae8..70e950e 100644 (file)
 #define RDISABLE               0x0001
 
 /********************** McBSP SYSCONFIG bit definitions ********************/
+#define CLOCKACTIVITY(value)   ((value)<<8)
 #define SIDLEMODE(value)       ((value)<<3)
 #define ENAWAKEUP              0x0004
 #define SOFTRST                        0x0002
index 86bfad8..2c274e6 100644 (file)
@@ -316,8 +316,8 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
                u16 syscon;
 
                syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON);
-               syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03));
-               syscon |= (ENAWAKEUP | SIDLEMODE(0x02));
+               syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
+               syscon |= (ENAWAKEUP | SIDLEMODE(0x02) | CLOCKACTIVITY(0x02));
                OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon);
 
                OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, XRDYEN | RRDYEN);
@@ -333,7 +333,7 @@ static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp)
                u16 syscon;
 
                syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON);
-               syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03));
+               syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03) | CLOCKACTIVITY(0x03));
                OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon);
 
                OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, 0);