static void omap_mcbsp_writew(void *opaque, target_phys_addr_t addr,

                uint32_t value)

{

    struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;

    int offset = addr & OMAP_MPUI_REG_MASK;



    if (offset == 0x04) {				/* DXR */

        if (((s->xcr[0] >> 5) & 7) < 3)			/* XWDLEN1 */

            return;

        if (s->tx_req > 3) {

            s->tx_req -= 4;

            if (s->codec && s->codec->cts) {

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 24) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 16) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 8) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 0) & 0xff;

            }

            if (s->tx_req < 4)

                omap_mcbsp_tx_done(s);

        } else

            printf("%s: Tx FIFO overrun\n", __FUNCTION__);

        return;

    }



    omap_badwidth_write16(opaque, addr, value);

}

static void omap_mcbsp_writew(void *opaque, target_phys_addr_t addr,

                uint32_t value)

{

    struct omap_mcbsp_s *s = (struct omap_mcbsp_s *) opaque;

    int offset = addr & OMAP_MPUI_REG_MASK;



    if (offset == 0x04) {				

        if (((s->xcr[0] >> 5) & 7) < 3)			

            return;

        if (s->tx_req > 3) {

            s->tx_req -= 4;

            if (s->codec && s->codec->cts) {

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 24) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 16) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 8) & 0xff;

                s->codec->out.fifo[s->codec->out.len ++] =

                        (value >> 0) & 0xff;

            }

            if (s->tx_req < 4)

                omap_mcbsp_tx_done(s);

        } else

            printf("%s: Tx FIFO overrun\n", __FUNCTION__);

        return;

    }



    omap_badwidth_write16(opaque, addr, value);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,

                uint32_t VAR_2)

{

    struct omap_mcbsp_s *VAR_3 = (struct omap_mcbsp_s *) VAR_0;

    int VAR_4 = VAR_1 & OMAP_MPUI_REG_MASK;



    if (VAR_4 == 0x04) {				

        if (((VAR_3->xcr[0] >> 5) & 7) < 3)			

            return;

        if (VAR_3->tx_req > 3) {

            VAR_3->tx_req -= 4;

            if (VAR_3->codec && VAR_3->codec->cts) {

                VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =

                        (VAR_2 >> 24) & 0xff;

                VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =

                        (VAR_2 >> 16) & 0xff;

                VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =

                        (VAR_2 >> 8) & 0xff;

                VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =

                        (VAR_2 >> 0) & 0xff;

            }

            if (VAR_3->tx_req < 4)

                omap_mcbsp_tx_done(VAR_3);

        } else

            printf("%VAR_3: Tx FIFO overrun\n", __FUNCTION__);

        return;

    }



    omap_badwidth_write16(VAR_0, VAR_1, VAR_2);

}

static void FUNC_0(void *VAR_0, target_phys_addr_t VAR_1,
uint32_t VAR_2)
{ struct omap_mcbsp_s *VAR_3 = (struct omap_mcbsp_s *) VAR_0; int VAR_4 = VAR_1 & OMAP_MPUI_REG_MASK; if (VAR_4 == 0x04) { if (((VAR_3->xcr[0] >> 5) & 7) < 3)
return; if (VAR_3->tx_req > 3) { VAR_3->tx_req -= 4; if (VAR_3->codec && VAR_3->codec->cts) { VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =
(VAR_2 >> 24) & 0xff; VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =
(VAR_2 >> 16) & 0xff; VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =
(VAR_2 >> 8) & 0xff; VAR_3->codec->out.fifo[VAR_3->codec->out.len ++] =
(VAR_2 >> 0) & 0xff; } if (VAR_3->tx_req < 4)
omap_mcbsp_tx_done(VAR_3); } else printf("%VAR_3: Tx FIFO overrun\n", __FUNCTION__); return; } omap_badwidth_write16(VAR_0, VAR_1, VAR_2); }