[PATCH 00/11] mos6522: switch to gpios, add control line edge-triggering and extra debugging

Mark Cave-Ayland posted 11 patches 2 years, 2 months ago
Test checkpatch passed
Failed in applying to current master (apply log)
There is a newer version of this series
hmp-commands-info.hx        |  12 ++
hw/m68k/q800.c              |   9 +-
hw/misc/mac_via.c           |  68 ++++--------
hw/misc/macio/cuda.c        |   8 +-
hw/misc/macio/pmu.c         |  40 +------
hw/misc/mos6522.c           | 212 +++++++++++++++++++++++++++++++++---
hw/misc/trace-events        |   4 +-
include/hw/misc/mac_via.h   |  25 ++---
include/hw/misc/macio/pmu.h |   2 -
include/hw/misc/mos6522.h   |  42 +++++--
10 files changed, 288 insertions(+), 134 deletions(-)
[PATCH 00/11] mos6522: switch to gpios, add control line edge-triggering and extra debugging
Posted by Mark Cave-Ayland 2 years, 2 months ago
Here is another patchset taken from my series to enable MacOS to boot on the q800
machine.

Patches 1-3 define the IFR bit flags in terms of the physical control lines and
update mac_via to use them.

Patch 4 does the main switch from custom methods in MOS6522DeviceClass to using
standard gpios whilst patch 5 removes these now-obsolete methods.

Patch 6 updates mos6522 instances to use the recommended method of calling
device_class_set_parent_reset() to propagate the device reset to the parent.

Patches 7 and 8 add more support for debugging guests using the mos6522 devices
by adding register names into the trace-event output and implementing a new
"info via" HMP command to give detailed information about the registers and timer
states.

Patches 9 and 10 implement edge-triggering for the CA1/2 and CB1/2 control lines as
documented in the datasheet, including updating the relevant inputs for negative
edge-triggering if required. Note that the introduction of last_irq_levels to enable
detection of the edge transition causes a migration break for the q800 and
g3beige/mac99 machines.

Finally patch 11 removes some old code in the PMU mos6522 instance which is now no
longer required with these latest changes.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


Mark Cave-Ayland (11):
  mos6522: add defines for IFR bit flags
  mac_via: use IFR bit flag constants for VIA1 IRQs
  mac_via: use IFR bit flag constants for VIA2 IRQs
  mos6522: switch over to use qdev gpios for IRQs
  mos6522: remove update_irq() and set_sr_int() methods from
    MOS6522DeviceClass
  mos6522: use device_class_set_parent_reset() to propagate reset to
    parent
  mos6522: add register names to register read/write trace events
  mos6522: add "info via" HMP command for debugging
  mos6522: record last_irq_levels in mos6522_set_irq()
  mos6522: implement edge-triggering for CA1/2 and CB1/2 control line
    IRQs
  macio/pmu.c: remove redundant code

 hmp-commands-info.hx        |  12 ++
 hw/m68k/q800.c              |   9 +-
 hw/misc/mac_via.c           |  68 ++++--------
 hw/misc/macio/cuda.c        |   8 +-
 hw/misc/macio/pmu.c         |  40 +------
 hw/misc/mos6522.c           | 212 +++++++++++++++++++++++++++++++++---
 hw/misc/trace-events        |   4 +-
 include/hw/misc/mac_via.h   |  25 ++---
 include/hw/misc/macio/pmu.h |   2 -
 include/hw/misc/mos6522.h   |  42 +++++--
 10 files changed, 288 insertions(+), 134 deletions(-)

-- 
2.20.1