Skip to content

Commit

Permalink
sh4/r2d: convert to new MMIO accessor style
Browse files Browse the repository at this point in the history
The documentation is clear to use 16-bit accesses for all registers.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  • Loading branch information
aurel32 committed Jun 12, 2015
1 parent e42fd94 commit 5638075
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions hw/sh4/r2d.c
Expand Up @@ -127,7 +127,7 @@ static void r2d_fpga_irq_set(void *opaque, int n, int level)
update_irl(fpga);
}

static uint32_t r2d_fpga_read(void *opaque, hwaddr addr)
static uint64_t r2d_fpga_read(void *opaque, hwaddr addr, unsigned int size)
{
r2d_fpga_t *s = opaque;

Expand All @@ -146,7 +146,7 @@ static uint32_t r2d_fpga_read(void *opaque, hwaddr addr)
}

static void
r2d_fpga_write(void *opaque, hwaddr addr, uint32_t value)
r2d_fpga_write(void *opaque, hwaddr addr, uint64_t value, unsigned int size)
{
r2d_fpga_t *s = opaque;

Expand All @@ -170,10 +170,10 @@ r2d_fpga_write(void *opaque, hwaddr addr, uint32_t value)
}

static const MemoryRegionOps r2d_fpga_ops = {
.old_mmio = {
.read = { r2d_fpga_read, r2d_fpga_read, NULL, },
.write = { r2d_fpga_write, r2d_fpga_write, NULL, },
},
.read = r2d_fpga_read,
.write = r2d_fpga_write,
.impl.min_access_size = 2,
.impl.max_access_size = 2,
.endianness = DEVICE_NATIVE_ENDIAN,
};

Expand Down

0 comments on commit 5638075

Please sign in to comment.