From patchwork Mon Aug 30 10:24:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 1522171 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GymhN4KlYz9sWX for ; Mon, 30 Aug 2021 20:26:43 +1000 (AEST) Received: from localhost ([::1]:48092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKeUx-0005g2-8J for incoming@patchwork.ozlabs.org; Mon, 30 Aug 2021 06:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKeTO-0005eS-8Q for qemu-devel@nongnu.org; Mon, 30 Aug 2021 06:25:02 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:53278 helo=mail.default.ilande.bv.iomart.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKeTM-0006m3-03 for qemu-devel@nongnu.org; Mon, 30 Aug 2021 06:25:01 -0400 Received: from host86-179-186-93.range86-179.btcentralplus.com ([86.179.186.93] helo=kentang.home) by mail.default.ilande.bv.iomart.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKeSs-0003D2-Bj; Mon, 30 Aug 2021 11:24:35 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, laurent@vivier.eu Date: Mon, 30 Aug 2021 11:24:35 +0100 Message-Id: <20210830102447.10806-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 86.179.186.93 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 00/12] mac_via: remove MAC_VIA device and prepare for Nubus IRQs X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.bv.iomart.io) Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.bv.iomart.io X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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-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(-)