/* 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)
#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
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);
* 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);
}
void omap_mcbsp_free(unsigned int id)
{
struct omap_mcbsp *mcbsp;
- u16 syscon, wakeupen;
int i;
if (!omap_mcbsp_check_valid_id(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)