static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,

                              unsigned size)

{

    MMIOState *s = opaque;

    addr >>= s->shift;

    if (addr & 7)

        return ide_ioport_read(&s->bus, addr);

    else

        return ide_data_readw(&s->bus, 0);

}

static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,

                              unsigned size)

{

    MMIOState *s = opaque;

    addr >>= s->shift;

    if (addr & 7)

        return ide_ioport_read(&s->bus, addr);

    else

        return ide_data_readw(&s->bus, 0);

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,

                              unsigned size)

{

    MMIOState *s = opaque;

    addr >>= s->shift;

    if (addr & 7)

        return ide_ioport_read(&s->bus, addr);

    else

        return ide_data_readw(&s->bus, 0);

}

static uint64_t FUNC_0(void *opaque, target_phys_addr_t addr,
unsigned size)
{ MMIOState *s = opaque; addr >>= s->shift; if (addr & 7)
return ide_ioport_read(&s->bus, addr); else
return ide_data_readw(&s->bus, 0); }