hw/arm/omap2.c: Don't use old_mmio
Don't use 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-7-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
28dc207f5f
commit
fc14cf0e95
@ -2087,19 +2087,44 @@ static void omap_sysctl_write(void *opaque, hwaddr addr,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint64_t omap_sysctl_readfn(void *opaque, hwaddr addr,
|
||||||
|
unsigned size)
|
||||||
|
{
|
||||||
|
switch (size) {
|
||||||
|
case 1:
|
||||||
|
return omap_sysctl_read8(opaque, addr);
|
||||||
|
case 2:
|
||||||
|
return omap_badwidth_read32(opaque, addr); /* TODO */
|
||||||
|
case 4:
|
||||||
|
return omap_sysctl_read(opaque, addr);
|
||||||
|
default:
|
||||||
|
g_assert_not_reached();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void omap_sysctl_writefn(void *opaque, hwaddr addr,
|
||||||
|
uint64_t value, unsigned size)
|
||||||
|
{
|
||||||
|
switch (size) {
|
||||||
|
case 1:
|
||||||
|
omap_sysctl_write8(opaque, addr, value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
omap_badwidth_write32(opaque, addr, value); /* TODO */
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
omap_sysctl_write(opaque, addr, value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_assert_not_reached();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps omap_sysctl_ops = {
|
static const MemoryRegionOps omap_sysctl_ops = {
|
||||||
.old_mmio = {
|
.read = omap_sysctl_readfn,
|
||||||
.read = {
|
.write = omap_sysctl_writefn,
|
||||||
omap_sysctl_read8,
|
.valid.min_access_size = 1,
|
||||||
omap_badwidth_read32, /* TODO */
|
.valid.max_access_size = 4,
|
||||||
omap_sysctl_read,
|
|
||||||
},
|
|
||||||
.write = {
|
|
||||||
omap_sysctl_write8,
|
|
||||||
omap_badwidth_write32, /* TODO */
|
|
||||||
omap_sysctl_write,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user