From nobody Sat Dec 21 16:47:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=ilande.co.uk Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684962739404699.0781208761678; Wed, 24 May 2023 14:12:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1vlq-0001MH-W2; Wed, 24 May 2023 17:11:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1vlm-0001Jg-GO for qemu-devel@nongnu.org; Wed, 24 May 2023 17:11:46 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1vlk-00020L-So for qemu-devel@nongnu.org; Wed, 24 May 2023 17:11:42 -0400 Received: from [2a00:23c4:8bac:6900:b726:cf58:4c12:f013] (helo=kentang.home) by mail.ilande.co.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1vlb-0005XR-Ln; Wed, 24 May 2023 22:11:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ilande.co.uk; s=20220518; h=Subject:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KXym8r0zdjDqyJagv36tD73OWSTKwv/2Jq9YH/crFwk=; b=Mj8ufHCkixK4gFJPXACtRhDXpW MWNDaNyHcABaeGTiexPyKTr/2U4Fkze85GY2LDfqDJAvPmLvWv336ZlHoMBq7nG2XwNm2yRqbY+0C z75m7BdekvTskUseaaLuTMh9aUGzEgP6h2Xbn+N1CRQvHFcvZwNYbOcGbfM1cFqP3LCDR9u8eBkhy PKG8K5PK1t+rqYSOowe2JitaTW+EhU0awrnf48UC4uVNIY9vs6Gb59Mdr0KOxZZCsV9te7pNO5GZL LeFffvwnV9+A9IH0PnX3HYts+yWrJI3Xbrp9abAE4GRc/xQxM/HJdoCaWSuQk6EHpPeXI/ywE7o0b zxXAsJyityUOw2bla5deDhZJV7fn6OTx3o4KVZEl0Dp/X3fxT6C+xCXKbUZuwu98+66NShKxfoeok dXtr/Vu4KqFynGs9R6f0YgRp8PxuNjW8mBmdjjlPSthyGrS3sRdUFEkuzWRlbKTktsGTHH2lXY9RP vvBx6CSM39ywlOE0IjgX1ZIb/tIMFsGUjko0OKOgSBwMEepKVk7EjQZNJ68phcZmXILmo7er8XhzM jRopYJWP3dqTVHfLvKdIvISCbTh5NJWqEkqJVohs2giBki9pJWyjY8F6PaxBkVt0o/ENQewrt3hNh bEtQyf1TZkuvmRiEqQB4orpMvp7KlSvMC81+tuEso=; From: Mark Cave-Ayland To: laurent@vivier.eu, qemu-devel@nongnu.org Date: Wed, 24 May 2023 22:10:40 +0100 Message-Id: <20230524211104.686087-7-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230524211104.686087-1-mark.cave-ayland@ilande.co.uk> References: <20230524211104.686087-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a00:23c4:8bac:6900:b726:cf58:4c12:f013 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 06/30] q800: move GLUE device to Q800MachineState X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.ilande.co.uk) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.ilande.co.uk X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1684962741212100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/m68k/q800.c | 20 ++++++++++---------- include/hw/m68k/q800.h | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 6a000ceb75..c22a98d616 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -392,7 +392,6 @@ static void q800_machine_init(MachineState *machine) SysBusDevice *sysbus; BusState *adb_bus; NubusBus *nubus; - DeviceState *glue; DriveInfo *dinfo; uint8_t rng_seed[32]; =20 @@ -427,9 +426,10 @@ static void q800_machine_init(MachineState *machine) } =20 /* IRQ Glue */ - glue =3D qdev_new(TYPE_GLUE); - object_property_set_link(OBJECT(glue), "cpu", OBJECT(m->cpu), &error_a= bort); - sysbus_realize_and_unref(SYS_BUS_DEVICE(glue), &error_fatal); + m->glue =3D qdev_new(TYPE_GLUE); + object_property_set_link(OBJECT(m->glue), "cpu", OBJECT(m->cpu), + &error_abort); + sysbus_realize_and_unref(SYS_BUS_DEVICE(m->glue), &error_fatal); =20 /* VIA 1 */ via1_dev =3D qdev_new(TYPE_MOS6522_Q800_VIA1); @@ -440,10 +440,10 @@ static void q800_machine_init(MachineState *machine) sysbus =3D SYS_BUS_DEVICE(via1_dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_VIA1)= ); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(m->glue, GLUE_IRQ_IN_VI= A1)); /* A/UX mode */ qdev_connect_gpio_out(via1_dev, 0, - qdev_get_gpio_in_named(glue, "auxmode", 0)); + qdev_get_gpio_in_named(m->glue, "auxmode", 0)); =20 adb_bus =3D qdev_get_child_bus(via1_dev, "adb.0"); dev =3D qdev_new(TYPE_ADB_KEYBOARD); @@ -456,7 +456,7 @@ static void q800_machine_init(MachineState *machine) sysbus =3D SYS_BUS_DEVICE(via2_dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 1, VIA_BASE + VIA_SIZE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_VIA2)= ); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(m->glue, GLUE_IRQ_IN_VI= A2)); =20 /* MACSONIC */ =20 @@ -489,7 +489,7 @@ static void q800_machine_init(MachineState *machine) sysbus =3D SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(sysbus, &error_fatal); sysbus_mmio_map(sysbus, 0, SONIC_BASE); - sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(glue, GLUE_IRQ_IN_SONIC= )); + sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(m->glue, GLUE_IRQ_IN_SO= NIC)); =20 memory_region_init_rom(dp8393x_prom, NULL, "dp8393x-q800.prom", SONIC_PROM_SIZE, &error_fatal); @@ -526,7 +526,7 @@ static void q800_machine_init(MachineState *machine) sysbus_connect_irq(sysbus, 0, qdev_get_gpio_in(escc_orgate, 0)); sysbus_connect_irq(sysbus, 1, qdev_get_gpio_in(escc_orgate, 1)); qdev_connect_gpio_out(DEVICE(escc_orgate), 0, - qdev_get_gpio_in(glue, GLUE_IRQ_IN_ESCC)); + qdev_get_gpio_in(m->glue, GLUE_IRQ_IN_ESCC)); sysbus_mmio_map(sysbus, 0, SCC_BASE); =20 /* SCSI */ @@ -581,7 +581,7 @@ static void q800_machine_init(MachineState *machine) * Since the framebuffer in slot 0x9 uses a separate IRQ, wire the unu= sed * IRQ via GLUE for use by SONIC Ethernet in classic mode */ - qdev_connect_gpio_out(glue, GLUE_IRQ_NUBUS_9, + qdev_connect_gpio_out(m->glue, GLUE_IRQ_NUBUS_9, qdev_get_gpio_in_named(via2_dev, "nubus-irq", VIA2_NUBUS_IRQ_9)); =20 diff --git a/include/hw/m68k/q800.h b/include/hw/m68k/q800.h index 2f3c720b8d..de02af53be 100644 --- a/include/hw/m68k/q800.h +++ b/include/hw/m68k/q800.h @@ -32,6 +32,7 @@ struct Q800MachineState { =20 M68kCPU *cpu; MemoryRegion rom; + DeviceState *glue; }; =20 #define TYPE_Q800_MACHINE MACHINE_TYPE_NAME("q800") --=20 2.30.2