mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 13:01:52 -06:00
i8254: convert PIO to new memory api read/write
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
f3726fd78d
commit
0505bcdec8
1 changed files with 11 additions and 9 deletions
20
hw/i8254.c
20
hw/i8254.c
|
@ -111,7 +111,8 @@ static void pit_latch_count(PITChannelState *s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pit_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
static void pit_ioport_write(void *opaque, hwaddr addr,
|
||||||
|
uint64_t val, unsigned size)
|
||||||
{
|
{
|
||||||
PITCommonState *pit = opaque;
|
PITCommonState *pit = opaque;
|
||||||
int channel, access;
|
int channel, access;
|
||||||
|
@ -178,7 +179,8 @@ static void pit_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t pit_ioport_read(void *opaque, uint32_t addr)
|
static uint64_t pit_ioport_read(void *opaque, hwaddr addr,
|
||||||
|
unsigned size)
|
||||||
{
|
{
|
||||||
PITCommonState *pit = opaque;
|
PITCommonState *pit = opaque;
|
||||||
int ret, count;
|
int ret, count;
|
||||||
|
@ -290,14 +292,14 @@ static void pit_irq_control(void *opaque, int n, int enable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionPortio pit_portio[] = {
|
|
||||||
{ 0, 4, 1, .write = pit_ioport_write },
|
|
||||||
{ 0, 3, 1, .read = pit_ioport_read },
|
|
||||||
PORTIO_END_OF_LIST()
|
|
||||||
};
|
|
||||||
|
|
||||||
static const MemoryRegionOps pit_ioport_ops = {
|
static const MemoryRegionOps pit_ioport_ops = {
|
||||||
.old_portio = pit_portio
|
.read = pit_ioport_read,
|
||||||
|
.write = pit_ioport_write,
|
||||||
|
.impl = {
|
||||||
|
.min_access_size = 1,
|
||||||
|
.max_access_size = 1,
|
||||||
|
},
|
||||||
|
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void pit_post_load(PITCommonState *s)
|
static void pit_post_load(PITCommonState *s)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue