From patchwork Wed Sep 19 17:21:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 10606131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DD5C913 for ; Wed, 19 Sep 2018 17:27:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12838283B2 for ; Wed, 19 Sep 2018 17:27:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 075D02C820; Wed, 19 Sep 2018 17:27:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97987283B2 for ; Wed, 19 Sep 2018 17:27:57 +0000 (UTC) Received: from localhost ([::1]:46528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2gGa-0000yv-UA for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Sep 2018 13:27:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2gAB-0003S6-Pk for qemu-devel@nongnu.org; Wed, 19 Sep 2018 13:21:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2gAA-0007xo-JN for qemu-devel@nongnu.org; Wed, 19 Sep 2018 13:21:19 -0400 Received: from chuckie.co.uk ([82.165.15.123]:58700 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 1g2gAA-0007w5-5O; Wed, 19 Sep 2018 13:21:18 -0400 Received: from host86-191-82-156.range86-191.btcentralplus.com ([86.191.82.156] 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 1g2gAM-00007Y-7t; Wed, 19 Sep 2018 18:21:31 +0100 From: Mark Cave-Ayland To: david@gibson.dropbear.id.au, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Wed, 19 Sep 2018 18:21:01 +0100 Message-Id: <20180919172101.8402-6-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180919172101.8402-1-mark.cave-ayland@ilande.co.uk> References: <20180919172101.8402-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 86.191.82.156 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 5/5] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: David Gibson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau Tested-by: Hervé Poussineau --- 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 7e2c70b92a..2afb7f437e 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -621,7 +621,7 @@ static void ibm_40p_init(MachineState *machine) CPUPPCState *env = NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; - DeviceState *dev; + DeviceState *dev, *i82378_dev; SysBusDevice *pcihost, *s; Nvram *m48t59 = NULL; PCIBus *pci_bus; @@ -666,11 +666,11 @@ static void ibm_40p_init(MachineState *machine) } /* PCI -> ISA bridge */ - dev = DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(11, 0), "i82378")); - qdev_connect_gpio_out(dev, 0, + i82378_dev = DEVICE(pci_create_simple(pci_bus, PCI_DEVFN(11, 0), "i82378")); + 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 = ISA_BUS(qdev_get_child_bus(dev, "isa.0")); + sysbus_connect_irq(pcihost, 0, qdev_get_gpio_in(i82378_dev, 15)); + isa_bus = ISA_BUS(qdev_get_child_bus(i82378_dev, "isa.0")); /* Memory controller */ dev = DEVICE(isa_create(isa_bus, "rs6000-mc")); @@ -703,6 +703,7 @@ static void ibm_40p_init(MachineState *machine) dev = 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)); /* XXX: s3-trio at PCI_DEVFN(2, 0) */ pci_vga_init(pci_bus);