diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2021-08-30 11:24:41 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-09-08 15:37:40 +0200 |
commit | 84e944b2afba1e4e2a40619516ac2ea2996671d4 (patch) | |
tree | d74a2c16e35e65afeb7b02dbdde069e62cbc7e6b | |
parent | 5f083d4224d8927b1ce9b0f6d0eaf661c9bd5d51 (diff) | |
download | qemu-84e944b2afba1e4e2a40619516ac2ea2996671d4.zip qemu-84e944b2afba1e4e2a40619516ac2ea2996671d4.tar.gz qemu-84e944b2afba1e4e2a40619516ac2ea2996671d4.tar.bz2 |
mac_via: move q800 VIA1 timer variables to q800 VIA1 VMStateDescription
These variables are already present in MOS6522Q800VIA1State and so it is just
the VMStateDescription move that is needed.
With this change the mac_via VMStateDescription is now empty and can be removed
completely.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210830102447.10806-7-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | hw/misc/mac_via.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index b4a6548..47e221d 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -1067,27 +1067,12 @@ static int via1_post_load(void *opaque, int version_id) return 0; } -static const VMStateDescription vmstate_mac_via = { - .name = "mac-via", - .version_id = 2, - .minimum_version_id = 2, - .fields = (VMStateField[]) { - /* VIAs */ - VMSTATE_TIMER_PTR(mos6522_via1.one_second_timer, MacVIAState), - VMSTATE_INT64(mos6522_via1.next_second, MacVIAState), - VMSTATE_TIMER_PTR(mos6522_via1.sixty_hz_timer, MacVIAState), - VMSTATE_INT64(mos6522_via1.next_sixty_hz, MacVIAState), - VMSTATE_END_OF_LIST() - } -}; - static void mac_via_class_init(ObjectClass *oc, void *data) { DeviceClass *dc = DEVICE_CLASS(oc); dc->realize = mac_via_realize; dc->reset = mac_via_reset; - dc->vmsd = &vmstate_mac_via; } static TypeInfo mac_via_info = { @@ -1150,6 +1135,11 @@ static const VMStateDescription vmstate_q800_via1 = { VMSTATE_BUFFER(adb_data_in, MOS6522Q800VIA1State), VMSTATE_BUFFER(adb_data_out, MOS6522Q800VIA1State), VMSTATE_UINT8(adb_autopoll_cmd, MOS6522Q800VIA1State), + /* Timers */ + VMSTATE_TIMER_PTR(one_second_timer, MOS6522Q800VIA1State), + VMSTATE_INT64(next_second, MOS6522Q800VIA1State), + VMSTATE_TIMER_PTR(sixty_hz_timer, MOS6522Q800VIA1State), + VMSTATE_INT64(next_sixty_hz, MOS6522Q800VIA1State), VMSTATE_END_OF_LIST() } }; |