static uint64_t omap_uwire_read(void *opaque, target_phys_addr_t addr,

                                unsigned size)

{

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

    int offset = addr & OMAP_MPUI_REG_MASK;



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (offset) {

    case 0x00:	/* RDR */

        s->control &= ~(1 << 15);			/* RDRB */

        return s->rxbuf;



    case 0x04:	/* CSR */

        return s->control;



    case 0x08:	/* SR1 */

        return s->setup[0];

    case 0x0c:	/* SR2 */

        return s->setup[1];

    case 0x10:	/* SR3 */

        return s->setup[2];

    case 0x14:	/* SR4 */

        return s->setup[3];

    case 0x18:	/* SR5 */

        return s->setup[4];

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t omap_uwire_read(void *opaque, target_phys_addr_t addr,

                                unsigned size)

{

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

    int offset = addr & OMAP_MPUI_REG_MASK;



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (offset) {

    case 0x00:	

        s->control &= ~(1 << 15);			

        return s->rxbuf;



    case 0x04:	

        return s->control;



    case 0x08:	

        return s->setup[0];

    case 0x0c:	

        return s->setup[1];

    case 0x10:	

        return s->setup[2];

    case 0x14:	

        return s->setup[3];

    case 0x18:	

        return s->setup[4];

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,

                                unsigned size)

{

    struct omap_uwire_s *VAR_0 = (struct omap_uwire_s *) opaque;

    int VAR_1 = addr & OMAP_MPUI_REG_MASK;



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (VAR_1) {

    case 0x00:	

        VAR_0->control &= ~(1 << 15);			

        return VAR_0->rxbuf;



    case 0x04:	

        return VAR_0->control;



    case 0x08:	

        return VAR_0->setup[0];

    case 0x0c:	

        return VAR_0->setup[1];

    case 0x10:	

        return VAR_0->setup[2];

    case 0x14:	

        return VAR_0->setup[3];

    case 0x18:	

        return VAR_0->setup[4];

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{ struct omap_uwire_s *VAR_0 = (struct omap_uwire_s *) opaque; int VAR_1 = addr & OMAP_MPUI_REG_MASK; if (size != 2) { return omap_badwidth_read16(opaque, addr); } switch (VAR_1) { case 0x00:
VAR_0->control &= ~(1 << 15); return VAR_0->rxbuf; case 0x04:
return VAR_0->control; case 0x08:
return VAR_0->setup[0]; case 0x0c:
return VAR_0->setup[1]; case 0x10:
return VAR_0->setup[2]; case 0x14:
return VAR_0->setup[3]; case 0x18:
return VAR_0->setup[4]; } OMAP_BAD_REG(addr); return 0; }