From patchwork Thu Mar 2 22:40:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 658156 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp144985wrb; Thu, 2 Mar 2023 14:42:19 -0800 (PST) X-Google-Smtp-Source: AK7set+C8YotUdFTbR/KAVp+W2jLFAGAHEDb+rTDqVlBZL4Ti/EuXI1XEJP6f+NOKuHT4VEL9sSX X-Received: by 2002:a05:6214:301e:b0:56e:a658:84e4 with SMTP id ke30-20020a056214301e00b0056ea65884e4mr19761055qvb.36.1677796938910; Thu, 02 Mar 2023 14:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677796938; cv=none; d=google.com; s=arc-20160816; b=vO3VeaHqXDkWxDn8j1znPUPqmqHH/RsZc75USXepi/tpekfFSpCl7XMnEQuouEN8P/ TVLj8jV8fBbFw5c8kOqM1tPTqvZiYl9xaNXssIWR/9oNncWLPiupI5TTuoevBd6t0utV NUDeKZp9P2C2L69DdHYUyVc7EB4Au21VEwCIsG/IC+j7O0eilh2T/vHEuIN2mtYubeuK RKPjg+mijiN7iMwqshrxwfhFcezodOnj+Pi6v/NLoOAB9DbTQhCJz24uu2wZXlOq9+g4 9m1kDuclfx6BlNe32matwMx/3A6p4CeHvizZBpuy1d6MIQqAz2VRr/9cqvuTOS7/FQOd 06KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IBU+8jdhjCYbSlld/hmcA7nJYY2utc4DYNvGGjyLRLg=; b=UFyzGHDV1668CvDmKqIOTclYhVivfX95Bn3Uc0KaEEJizMXmsFvQZoVInPsTegs48W UpcHPMJmccy6EK57bmHZyvm+buvAuoh+vB7xuu3UFJ1CmeizA0Troou4qtCb4aRhpr7R 26E5ghFn/pyBGSYfp7pWyOkJcjeg0cpb2lEQXw7HyDd4q7V13ah5RErYWxWmwws+WMG+ GIZHvT/3+2eX404IpWniid2tiRKhl/wvnIySQFKdNUXM47lb4Nt9FVH1hNzOhJPY9aJQ iaaGGDZAhFGPtGc9ErkJwqmiCzn9GMMWwJ+h+sYi7tWJ1dfyUJHb4xXwHo0IKRR4gGel Nh4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n0/7lUwE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id br38-20020a05620a462600b00742adba1ecesi585172qkb.507.2023.03.02.14.42.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Mar 2023 14:42:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n0/7lUwE"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXrc9-00074V-WB; Thu, 02 Mar 2023 17:41:30 -0500 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 1pXrc7-00073y-Um for qemu-devel@nongnu.org; Thu, 02 Mar 2023 17:41:27 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXrc6-0008Ni-D0 for qemu-devel@nongnu.org; Thu, 02 Mar 2023 17:41:27 -0500 Received: by mail-wr1-x42b.google.com with SMTP id q16so619608wrw.2 for ; Thu, 02 Mar 2023 14:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677796885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IBU+8jdhjCYbSlld/hmcA7nJYY2utc4DYNvGGjyLRLg=; b=n0/7lUwEOFQu4z7Uz/XunGZ/aSRMTUgk6d35oeLKW+f7siuafmKtyGvOZYBcdMzPZp PddLv2zeG/pRLQSJynI114jC/FN6Xt3hjyRSi0xK4fXFO4KK+n9MwgKMb8CxFOhao+P0 gHnVQcuGXJohuWxfNjvN5aWMvwEM3DgRIX2U6I1pFnFR9rX7GyMr6aEcO7otPIoeE07x PPN5d/a/Dx3mCroJzs35ZfyhdNzRDEpQFbZEzPuKsc2/AWC/x77BOamjI00gfeRss53c w2RZjxXPpFhdrwL2vnD45ADQDpN5/wSwWzg+wFolxowCWcAdwXuf2oGi245DQPjwmVHX KAGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677796885; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IBU+8jdhjCYbSlld/hmcA7nJYY2utc4DYNvGGjyLRLg=; b=cfH4lAJTDDuMYCjean1eV/DAI5Fz/jfEvj90BKv7LAAlsFUG23j1sTVlAAye7qDhUm mK8R1kUauNONVm2tDqfBTsGSBphcAORSOypDPbggGkMDIIZv29Jo61uFGju7FWxqggQa 3pNyb5np3Tr8YmtF1ehjADV42TrItpfjDBDPmHfkbzD9Yxxmo170+Fp8et+PlXou5Mx0 Tu7saJS3WAy9GIm8sDFL+KdVBNQL8lty1iurdedZtYjE+EEKa/p4M9bAuaJUAB7MGs0P 6GuA1PmEi6irbm4tDQH1ixhNHPjCSNRpBTGrrrTUFz/3zRGE1hvuQBcdxQ+bT0n+Hy1G UTyw== X-Gm-Message-State: AO0yUKVskC8B7VVZuhgheOZgCSoyJYphL/fr3dx43TQGxdFXZPDVmTjc zFEh225Q3OTMQTLlV71MrWZUl6UcXuWKstKj X-Received: by 2002:adf:f9c5:0:b0:2cb:eef2:daff with SMTP id w5-20020adff9c5000000b002cbeef2daffmr8803089wrr.22.1677796885442; Thu, 02 Mar 2023 14:41:25 -0800 (PST) Received: from localhost.localdomain (43.red-95-127-39.staticip.rima-tde.net. [95.127.39.43]) by smtp.gmail.com with ESMTPSA id o14-20020a5d408e000000b002bfd524255esm497315wrp.43.2023.03.02.14.41.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 Mar 2023 14:41:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Bernhard Beschow Cc: John Snow , David Woodhouse , BALATON Zoltan , =?utf-8?q?Herv=C3=A9_Poussineau?= , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v3 03/18] hw/i386/pc_piix: Wire PIIX3 IDE ouput IRQs to ISA bus IRQs 14/15 Date: Thu, 2 Mar 2023 23:40:43 +0100 Message-Id: <20230302224058.43315-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230302224058.43315-1-philmd@linaro.org> References: <20230302224058.43315-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since pc_init1() has access to the ISABus*, retrieve the ISA IRQs with isa_bus_get_irq(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 126b6c11df..1e90b9ff0d 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -277,7 +277,13 @@ static void pc_init1(MachineState *machine, if (pcmc->pci_enabled) { PCIDevice *dev; - dev = pci_create_simple(pci_bus, piix3_devfn + 1, TYPE_PIIX3_IDE); + dev = pci_new_multifunction(piix3_devfn + 1, false, TYPE_PIIX3_IDE); + qdev_connect_gpio_out_named(DEVICE(dev), "ide-irq", 0, + isa_bus_get_irq(isa_bus, 14)); + qdev_connect_gpio_out_named(DEVICE(dev), "ide-irq", 1, + isa_bus_get_irq(isa_bus, 15)); + pci_realize_and_unref(dev, pci_bus, &error_fatal); + pci_ide_create_devs(dev); idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0"); idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");