aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-10-08 13:24:52 +0200
committerAlexander Graf <agraf@suse.de>2012-10-29 11:45:55 +0100
commit93ef41928299efbd7879bc63f329893e65e6e1de (patch)
treedcee93c874f2fd33b2069a0bc0550159e2f6fe6e /hw/pc.c
parent0da8c842b73924fb54ed75fb8850be5f7e978df9 (diff)
downloadqemu-93ef41928299efbd7879bc63f329893e65e6e1de.zip
qemu-93ef41928299efbd7879bc63f329893e65e6e1de.tar.gz
qemu-93ef41928299efbd7879bc63f329893e65e6e1de.tar.bz2
pc port92: convert PIO to new memory api read/write
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 16de04c..a02b397 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -421,7 +421,8 @@ typedef struct Port92State {
qemu_irq *a20_out;
} Port92State;
-static void port92_write(void *opaque, uint32_t addr, uint32_t val)
+static void port92_write(void *opaque, hwaddr addr, uint64_t val,
+ unsigned size)
{
Port92State *s = opaque;
@@ -433,7 +434,8 @@ static void port92_write(void *opaque, uint32_t addr, uint32_t val)
}
}
-static uint32_t port92_read(void *opaque, uint32_t addr)
+static uint64_t port92_read(void *opaque, hwaddr addr,
+ unsigned size)
{
Port92State *s = opaque;
uint32_t ret;
@@ -468,13 +470,14 @@ static void port92_reset(DeviceState *d)
s->outport &= ~1;
}
-static const MemoryRegionPortio port92_portio[] = {
- { 0, 1, 1, .read = port92_read, .write = port92_write },
- PORTIO_END_OF_LIST(),
-};
-
static const MemoryRegionOps port92_ops = {
- .old_portio = port92_portio
+ .read = port92_read,
+ .write = port92_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 1,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static int port92_initfn(ISADevice *dev)