static uint64_t omap_wd_timer_read(void *opaque, target_phys_addr_t addr,

                                   unsigned size)

{

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



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (addr) {

    case 0x00:	/* CNTL_TIMER */

        return (s->timer.ptv << 9) | (s->timer.ar << 8) |

                (s->timer.st << 7) | (s->free << 1);



    case 0x04:	/* READ_TIMER */

        return omap_timer_read(&s->timer);



    case 0x08:	/* TIMER_MODE */

        return s->mode << 15;

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t omap_wd_timer_read(void *opaque, target_phys_addr_t addr,

                                   unsigned size)

{

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



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (addr) {

    case 0x00:	

        return (s->timer.ptv << 9) | (s->timer.ar << 8) |

                (s->timer.st << 7) | (s->free << 1);



    case 0x04:	

        return omap_timer_read(&s->timer);



    case 0x08:	

        return s->mode << 15;

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,

                                   unsigned size)

{

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



    if (size != 2) {

        return omap_badwidth_read16(opaque, addr);

    }



    switch (addr) {

    case 0x00:	

        return (VAR_0->timer.ptv << 9) | (VAR_0->timer.ar << 8) |

                (VAR_0->timer.st << 7) | (VAR_0->free << 1);



    case 0x04:	

        return omap_timer_read(&VAR_0->timer);



    case 0x08:	

        return VAR_0->mode << 15;

    }



    OMAP_BAD_REG(addr);

    return 0;

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{ struct omap_watchdog_timer_s *VAR_0 = (struct omap_watchdog_timer_s *) opaque; if (size != 2) { return omap_badwidth_read16(opaque, addr); } switch (addr) { case 0x00:
return (VAR_0->timer.ptv << 9) | (VAR_0->timer.ar << 8) |
(VAR_0->timer.st << 7) | (VAR_0->free << 1); case 0x04:
return omap_timer_read(&VAR_0->timer); case 0x08:
return VAR_0->mode << 15; } OMAP_BAD_REG(addr); return 0; }