hw/timer/omap_synctimer.c: Don't use old_mmio
Don't use the old_mmio in the memory region ops struct. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 1505580378-9044-4-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
940caf1f7e
commit
27f5bab84d
@ -68,25 +68,32 @@ static uint32_t omap_synctimer_readh(void *opaque, hwaddr addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_synctimer_write(void *opaque, hwaddr addr,
|
static uint64_t omap_synctimer_readfn(void *opaque, hwaddr addr,
|
||||||
uint32_t value)
|
unsigned size)
|
||||||
|
{
|
||||||
|
switch (size) {
|
||||||
|
case 1:
|
||||||
|
return omap_badwidth_read32(opaque, addr);
|
||||||
|
case 2:
|
||||||
|
return omap_synctimer_readh(opaque, addr);
|
||||||
|
case 4:
|
||||||
|
return omap_synctimer_readw(opaque, addr);
|
||||||
|
default:
|
||||||
|
g_assert_not_reached();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void omap_synctimer_writefn(void *opaque, hwaddr addr,
|
||||||
|
uint64_t value, unsigned size)
|
||||||
{
|
{
|
||||||
OMAP_BAD_REG(addr);
|
OMAP_BAD_REG(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps omap_synctimer_ops = {
|
static const MemoryRegionOps omap_synctimer_ops = {
|
||||||
.old_mmio = {
|
.read = omap_synctimer_readfn,
|
||||||
.read = {
|
.write = omap_synctimer_writefn,
|
||||||
omap_badwidth_read32,
|
.valid.min_access_size = 1,
|
||||||
omap_synctimer_readh,
|
.valid.max_access_size = 4,
|
||||||
omap_synctimer_readw,
|
|
||||||
},
|
|
||||||
.write = {
|
|
||||||
omap_badwidth_write32,
|
|
||||||
omap_synctimer_write,
|
|
||||||
omap_synctimer_write,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user