From nobody Wed Nov 5 16:41:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1536612507025563.6657150383559; Mon, 10 Sep 2018 13:48:27 -0700 (PDT) Received: from localhost ([::1]:53921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzT6f-0008V4-WE for importer@patchew.org; Mon, 10 Sep 2018 16:48:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzT5C-000695-K4 for qemu-devel@nongnu.org; Mon, 10 Sep 2018 16:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzT59-000374-Ji for qemu-devel@nongnu.org; Mon, 10 Sep 2018 16:46:54 -0400 Received: from chuckie.co.uk ([82.165.15.123]:36852 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzT59-00036R-D9; Mon, 10 Sep 2018 16:46:51 -0400 Received: from host86-138-87-37.range86-138.btcentralplus.com ([86.138.87.37] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fzT5F-0001Wq-Cc; Mon, 10 Sep 2018 21:46:58 +0100 From: Mark Cave-Ayland To: hpoussin@reactos.org, david@gibson.dropbear.id.au, pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Mon, 10 Sep 2018 21:46:31 +0100 Message-Id: <20180910204631.24106-3-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180910204631.24106-1-mark.cave-ayland@ilande.co.uk> References: <20180910204631.24106-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.138.87.37 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH v3 2/2] 40p: add fixed IRQ routing for LSI SCSI device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Whilst the PReP specification describes how all PCI IRQs are routed via IRQ 15 on the interrupt controller, the real 40p machine has a routing quirk in that the LSI SCSI device is routed directly to IRQ 13. Enable the external IRQ for the LSI SCSI device by wiring up the IRQ with qdev to the relevant interrupt controller gpio. Signed-off-by: Mark Cave-Ayland --- hw/ppc/prep.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 615865e46c..94fc36b7ef 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -621,7 +621,7 @@ static void ibm_40p_init(MachineState *machine) CPUPPCState *env =3D NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; - DeviceState *dev; + DeviceState *dev, *i82378_dev; SysBusDevice *pcihost, *s; Nvram *m48t59 =3D NULL; PCIBus *pci_bus; @@ -666,11 +666,11 @@ static void ibm_40p_init(MachineState *machine) } =20 /* PCI -> ISA bridge */ - dev =3D DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(11, 0), "i82378")); - qdev_connect_gpio_out(dev, 0, + i82378_dev =3D DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(11, 0), "i8= 2378")); + qdev_connect_gpio_out(i82378_dev, 0, cpu->env.irq_inputs[PPC6xx_INPUT_INT]); - sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(dev, 15)); - isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); + sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); + isa_bus =3D ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0")); =20 /* Memory controller */ dev =3D DEVICE(isa_create(isa_bus, "rs6000-mc")); @@ -703,6 +703,7 @@ static void ibm_40p_init(MachineState *machine) dev =3D DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "lsi53c810")); lsi53c8xx_handle_legacy_cmdline(dev); + qdev_connect_gpio_out(dev, 0, qdev_get_gpio_in(i82378_dev, 13)); =20 /* XXX: s3-trio at PCI_DEVFN(2, 0) */ pci_vga_init(pci_bus); --=20 2.11.0