[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/14] mc146818rtc: convert PIO to new memory api re
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 06/14] mc146818rtc: convert PIO to new memory api read/write |
Date: |
Mon, 8 Oct 2012 14:23:45 +0200 |
Signed-off-by: Alexander Graf <address@hidden>
---
hw/mc146818rtc.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index 332a77d..670f826 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -383,7 +383,8 @@ static void rtc_update_timer(void *opaque)
check_update_timer(s);
}
-static void cmos_ioport_write(void *opaque, uint32_t addr, uint32_t data)
+static void cmos_ioport_write(void *opaque, target_phys_addr_t addr,
+ uint64_t data, unsigned size)
{
RTCState *s = opaque;
@@ -595,7 +596,8 @@ static int update_in_progress(RTCState *s)
return 0;
}
-static uint32_t cmos_ioport_read(void *opaque, uint32_t addr)
+static uint64_t cmos_ioport_read(void *opaque, target_phys_addr_t addr,
+ unsigned size)
{
RTCState *s = opaque;
int ret;
@@ -769,13 +771,14 @@ static void rtc_reset(void *opaque)
#endif
}
-static const MemoryRegionPortio cmos_portio[] = {
- {0, 2, 1, .read = cmos_ioport_read, .write = cmos_ioport_write },
- PORTIO_END_OF_LIST(),
-};
-
static const MemoryRegionOps cmos_ops = {
- .old_portio = cmos_portio
+ .read = cmos_ioport_read,
+ .write = cmos_ioport_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 1,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static void rtc_get_date(Object *obj, Visitor *v, void *opaque,
--
1.6.0.2
- [Qemu-devel] [PATCH 00/14] Remove old_portio users for memory region PIO mapping, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 05/14] m48t59: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 06/14] mc146818rtc: convert PIO to new memory api read/write,
Alexander Graf <=
- [Qemu-devel] [PATCH 04/14] i8254: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 02/14] virtio-pci: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 08/14] pckbd: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 09/14] rtl8139: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 01/14] ac97: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 14/14] PPC: pseries: Remove hack for PIO window, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 03/14] es1370: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 07/14] pc port92: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 10/14] serial: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08
- [Qemu-devel] [PATCH 11/14] vmport: convert PIO to new memory api read/write, Alexander Graf, 2012/10/08