From: Tony Lindgren Date: Fri, 20 Feb 2009 21:16:53 +0000 (-0800) Subject: Build fixes for McBSP wakeups X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=af9b42cda273c31996c548a076e884fb1082ac75;p=linux-2.6-omap-h63xx.git Build fixes for McBSP wakeups Commit 050893ae211017753ffb90d19aafc86da967ac28 was missing the related register defines. Add the register defines to fix build and also clean-up a bit to get rid of build warnings omap1. Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index 72329505ac1..26bde0519c5 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h @@ -90,6 +90,8 @@ /* Dummy defines, these are not available on omap1 */ #define OMAP_MCBSP_REG_XCCR 0x00 #define OMAP_MCBSP_REG_RCCR 0x00 +#define OMAP_MCBSP_REG_SYSCON 0x00 +#define OMAP_MCBSP_REG_WAKEUPEN 0x00 #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) @@ -134,6 +136,7 @@ #define OMAP_MCBSP_REG_XCERG 0x74 #define OMAP_MCBSP_REG_XCERH 0x78 #define OMAP_MCBSP_REG_SYSCON 0x8C +#define OMAP_MCBSP_REG_WAKEUPEN 0xA8 #define OMAP_MCBSP_REG_XCCR 0xAC #define OMAP_MCBSP_REG_RCCR 0xB0 diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index ce9d09f4466..a94d03edea0 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c @@ -216,7 +216,6 @@ int omap_mcbsp_request(unsigned int id) struct omap_mcbsp *mcbsp; int i; int err; - u16 syscon; if (!omap_mcbsp_check_valid_id(id)) { printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); @@ -246,10 +245,12 @@ int omap_mcbsp_request(unsigned int id) * REVISIT: some wakeups may be unnecessary */ if (cpu_is_omap34xx()) { - syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); - syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03)); - syscon |= (ENAWAKEUP | SIDLEMODE(0x02)); - OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon); + u16 w; + + w = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); + w &= ~(ENAWAKEUP | SIDLEMODE(0x03)); + w |= (ENAWAKEUP | SIDLEMODE(0x02)); + OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, w); OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, WAKEUPEN_ALL); } @@ -292,7 +293,6 @@ EXPORT_SYMBOL(omap_mcbsp_request); void omap_mcbsp_free(unsigned int id) { struct omap_mcbsp *mcbsp; - u16 syscon, wakeupen; int i; if (!omap_mcbsp_check_valid_id(id)) { @@ -305,13 +305,15 @@ void omap_mcbsp_free(unsigned int id) * Disable wakup behavior, smart idle and all wakeups */ if (cpu_is_omap34xx()) { - syscon = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); - syscon &= ~(ENAWAKEUP | SIDLEMODE(0x03)); - OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, syscon); + u16 w; + + w = OMAP_MCBSP_READ(mcbsp->io_base, SYSCON); + w &= ~(ENAWAKEUP | SIDLEMODE(0x03)); + OMAP_MCBSP_WRITE(mcbsp->io_base, SYSCON, w); - wakeupen = OMAP_MCBSP_READ(mcbsp->io_base, WAKEUPEN); - wakeupen &= ~WAKEUPEN_ALL; - OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, wakeupen); + w = OMAP_MCBSP_READ(mcbsp->io_base, WAKEUPEN); + w &= ~WAKEUPEN_ALL; + OMAP_MCBSP_WRITE(mcbsp->io_base, WAKEUPEN, w); } if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free)