mac_via: always clear ADB interrupt when switching to A/UX mode
commitc698b0c8edd63f8631efd935ac75c28418ae4c7d
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 4 Oct 2023 08:38:03 +0000 (4 09:38 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 6 Oct 2023 08:33:43 +0000 (6 10:33 +0200)
treeb73d7133ff60ccd61ad6af276748202f0750d36e
parent7ebfb91d8f07447dc6cd30fba0119dc07c9cd3ba
mac_via: always clear ADB interrupt when switching to A/UX mode

When the NetBSD kernel initialises it can leave the ADB interrupt asserted
depending upon where in the ADB poll cycle the MacOS ADB interrupt handler
is when the NetBSD kernel disables interrupts.

The NetBSD ADB driver uses the ADB interrupt state to determine if the ADB
is busy and refuses to send ADB commands unless it is clear. To ensure that
this doesn't happen, always clear the ADB interrupt when switching to A/UX
mode to ensure that the bus enumeration always occurs.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-18-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/misc/mac_via.c