diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2020-06-23 21:49:33 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2020-06-26 10:13:52 +0100 |
commit | 975fcedd3194b486916a4b13afbf8308edf5b1a1 (patch) | |
tree | 195590d6cd76b64e915b492477064c18fb580013 /include | |
parent | 378a50347931e71b15aaec44c4dc0f9adfa346bf (diff) | |
download | qemu-975fcedd3194b486916a4b13afbf8308edf5b1a1.zip qemu-975fcedd3194b486916a4b13afbf8308edf5b1a1.tar.gz qemu-975fcedd3194b486916a4b13afbf8308edf5b1a1.tar.bz2 |
mac_via: rework ADB state machine to be compatible with both MacOS and Linux
The existing ADB state machine is designed to work with Linux which has a different
interpretation of the state machine detailed in "Guide to the Macintosh Family
Hardware". In particular the current Linux implementation includes an extra change
to IDLE state when switching the VIA between send and receive modes which does not
occur in MacOS, and omitting this transition causes the current mac_via ADB state
machine to fail.
Rework the ADB state machine accordingly so that it can enumerate and autopoll the
ADB under both Linux and MacOS, including the addition of the new adb_autopoll_block()
and adb_autopoll_unblock() functions.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200623204936.24064-20-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/misc/mac_via.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 2aaf9e2..0be05d6 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -112,6 +112,7 @@ typedef struct MacVIAState { int adb_data_out_index; uint8_t adb_data_in[128]; uint8_t adb_data_out[16]; + uint8_t adb_autopoll_cmd; } MacVIAState; #endif |