This is the VIA part of the next set of patches to enable QEMU's q800 machine to boot MacOS.
Currently there are 2 separate VIA devices which are contained within a pseudo MAC_VIA device and the main aim of this patchset is to remove it so that the separate VIA1 and VIA2 devices are accessed directly. The motivation for this is two-fold: firstly there is confusing mix of MacVIAState, MOS6522Q800VIA1State and MOS6522Q800VIA2State being passed around in mac_via.c with excessive conversions between them, and secondly there is a mixture of GPIOs and aliasing that only exist because of the pseudo MAC_VIA device. Since upcoming Nubus changes will require more wiring between VIA1/VIA2 and Nubus, managing these as separate devices helps reduce the complexity accordingly. This is obviously another migration break for the q800 machine but for now we don't care since there are more breaking changes in the pipeline. Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk> Mark Cave-Ayland (12): mac_via: introduce new VMStateDescription for q800 VIA1 and VIA2 mac_via: move last_b variable into q800 VIA1 VMStateDescription mac_via: move PRAM contents and block backend to MOS6522Q800VIA1State mac_via: move PRAM/RTC variables to MOS6522Q800VIA1State mac_via: move ADB variables to MOS6522Q800VIA1State mac_via: move q800 VIA1 timer variables to q800 VIA1 VMStateDescription mac_via: move VIA1 reset logic from mac_via_reset() to mos6522_q800_via1_reset() mac_via: move VIA1 realize logic from mac_via_realize() to mos6522_q800_via1_realize() mac_via: remove mac_via device mac_via: remove explicit viaN prefix from VIA IRQ gpios mac_via: rename VIA2_IRQ_SLOT_BIT to VIA2_IRQ_NUBUS_BIT mac_via: add qdev gpios for nubus slot interrupts to VIA2 hw/m68k/q800.c | 38 +-- hw/misc/mac_via.c | 547 ++++++++++++++++++-------------------- include/hw/misc/mac_via.h | 101 ++++--- 3 files changed, 328 insertions(+), 358 deletions(-) -- 2.20.1