mirror of https://github.com/proxmox/mirror_qemu
hw/arm/palm.c: Don't use old_mmio for static_ops
Update the static_ops functions to use new-style mmio rather than the legacy old_mmio functions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 1505580378-9044-2-git-send-email-peter.maydell@linaro.orgmaster
parent
4ce31af4ae
commit
7b675f1f97
|
@ -31,26 +31,16 @@
|
||||||
#include "exec/address-spaces.h"
|
#include "exec/address-spaces.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
static uint32_t static_readb(void *opaque, hwaddr offset)
|
static uint64_t static_read(void *opaque, hwaddr offset, unsigned size)
|
||||||
{
|
{
|
||||||
uint32_t *val = (uint32_t *) opaque;
|
uint32_t *val = (uint32_t *)opaque;
|
||||||
return *val >> ((offset & 3) << 3);
|
uint32_t sizemask = 7 >> size;
|
||||||
|
|
||||||
|
return *val >> ((offset & sizemask) << 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t static_readh(void *opaque, hwaddr offset)
|
static void static_write(void *opaque, hwaddr offset, uint64_t value,
|
||||||
{
|
unsigned size)
|
||||||
uint32_t *val = (uint32_t *) opaque;
|
|
||||||
return *val >> ((offset & 1) << 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t static_readw(void *opaque, hwaddr offset)
|
|
||||||
{
|
|
||||||
uint32_t *val = (uint32_t *) opaque;
|
|
||||||
return *val >> ((offset & 0) << 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void static_write(void *opaque, hwaddr offset,
|
|
||||||
uint32_t value)
|
|
||||||
{
|
{
|
||||||
#ifdef SPY
|
#ifdef SPY
|
||||||
printf("%s: value %08lx written at " PA_FMT "\n",
|
printf("%s: value %08lx written at " PA_FMT "\n",
|
||||||
|
@ -59,10 +49,10 @@ static void static_write(void *opaque, hwaddr offset,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps static_ops = {
|
static const MemoryRegionOps static_ops = {
|
||||||
.old_mmio = {
|
.read = static_read,
|
||||||
.read = { static_readb, static_readh, static_readw, },
|
.write = static_write,
|
||||||
.write = { static_write, static_write, static_write, },
|
.valid.min_access_size = 1,
|
||||||
},
|
.valid.max_access_size = 4,
|
||||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue