mos6522: move timer frequency initialisation to mos6522_reset
commitd638fd5c9681dbb8915147365520888c64f39dac
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 7 Jun 2018 17:17:50 +0000 (7 18:17 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Jun 2018 00:44:36 +0000 (12 10:44 +1000)
tree08421b576eacc0e20b1e839eb72952d1754a7b55
parent2e3e5c7e92452900e2bb5143c5fb6d47c0897a34
mos6522: move timer frequency initialisation to mos6522_reset

The 6522 VIA timer frequency cannot be set by altering registers within the
device itself and hence it is a fixed property of the machine.

Move the initialisation of the timer frequency to the mos6522 reset function
and ensure that any subclasses always call the parent reset function so that
it isn't required to store the timer frequency within vmstate_mos6522_timer
itself.

By moving the frequency initialisation to the device reset function then we
find that the realize function for both mos6522 and mos6522_cuda becomes
obsolete and can simply be removed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/misc/macio/cuda.c
hw/misc/mos6522.c
include/hw/misc/mos6522.h