From patchwork Wed Mar 23 17:35:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zongyuan Li X-Patchwork-Id: 12790017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8F6B3C433EF for ; Wed, 23 Mar 2022 17:51:20 +0000 (UTC) Received: from localhost ([::1]:50690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX58h-0001Cn-CU for qemu-devel@archiver.kernel.org; Wed, 23 Mar 2022 13:51:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX4u6-0008H8-16 for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:15 -0400 Received: from [2607:f8b0:4864:20::530] (port=46829 helo=mail-pg1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX4u3-0005Tl-9H for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:13 -0400 Received: by mail-pg1-x530.google.com with SMTP id b130so293193pga.13 for ; Wed, 23 Mar 2022 10:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SXPFckhjjqOPFa0Mt1YU+0EelaVejpES613ER/BKATM=; b=6uSggFfAaQs4U1h+AV6Kwn440TRAo/4Iv1yz4PaZlSeQubyjJ1+82P1uH1ezrPaUEw oi/I3QPxPmVHedOVSgNK3BYpI52OcZRNSFUr99irgY9YKezA9twR2hdPCO4tJzzJYf0r +FLCvIzElhQYkZ7Ax4zoyl9YnYKms2va2HRhW+CD3LLiVZyn7iNda2sHw0/DeyYClm0J cpkKXoyWxILWtu0FVnb7l/GCYjNHRkuXM1E/FKZB8rohNjDI8ZKHznb3bXhcOdavqCbR 66/kHKmPbn185kWem1G0xDmJjWQ4rDu6FMcZzS9TBjSJWYlnWBkxnP15VquMAOvitNVw W38A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SXPFckhjjqOPFa0Mt1YU+0EelaVejpES613ER/BKATM=; b=J2W2D3F3QXd1Do9qhDlUO/8CHJj9dLFMNksT5QTQEpdxne9hWoU0iSpVBmJFE3kP3B b+uRQU1/KU0zU7osOv/Ur2zsEiMV8nmv/14B8Z6xdHrtLVMcFWXCQZDDnyipLA43dF9X E8+XnmB9ef06Fou1A1e6jO1cj55AA63yGrnKAsv2ZKa7yzfEBV4bdamVS/FYR4Nx/wtZ MdpcM7/KUDCf9VsmBBv9HLx9vPqfVW4N9rclQsNoSCp9NpkzEN5Qt1ALAPXe3DLf8/HY 1Vgga8t46FzODbfSpeWVmtAPG+VGcQT3j78zydXbwlezNzR7epJ2ttdAZvdLz34rkDZv LLFw== X-Gm-Message-State: AOAM532XTkah9BxTeyOWShcjkqKQZHRfpNH/pe+gQqVgGEusQyZkPC9W 4Eog0NGZYS1o/WNX+Z4x8C3K1fCZE3pgBA== X-Google-Smtp-Source: ABdhPJz92TfazPCs9SwHpFd3jrmweZf41aJl/kE058C4/dblDRa7PQUeg757MWY/WWZkHqsTs8dgQw== X-Received: by 2002:a65:6cc3:0:b0:382:9d3c:ff82 with SMTP id g3-20020a656cc3000000b003829d3cff82mr816953pgw.110.1648056969949; Wed, 23 Mar 2022 10:36:09 -0700 (PDT) Received: from dev.lizongyuan.local ([103.177.44.11]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm553239pfu.35.2022.03.23.10.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 10:36:09 -0700 (PDT) From: Zongyuan Li To: qemu-devel@nongnu.org Subject: [PATCH v3 1/5] hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' Date: Thu, 24 Mar 2022 01:35:39 +0800 Message-Id: <20220323173543.146442-2-zongyuan.li@smartx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220323173543.146442-1-zongyuan.li@smartx.com> References: <20220323173543.146442-1-zongyuan.li@smartx.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::530 (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::530; envelope-from=zongyuan.li@smartx.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Peter Maydell , "open list:Real View" , Zongyuan Li Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Zongyuan Li --- hw/arm/realview.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index 7b424e94a5..97ace560bf 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -13,9 +13,11 @@ #include "hw/sysbus.h" #include "hw/arm/boot.h" #include "hw/arm/primecell.h" +#include "hw/core/split-irq.h" #include "hw/net/lan9118.h" #include "hw/net/smc91c111.h" #include "hw/pci/pci.h" +#include "hw/qdev-core.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -53,6 +55,24 @@ static const int realview_board_id[] = { 0x76d }; +static bool split_irq_from_named(DeviceState *src, const char* outname, + qemu_irq out1, qemu_irq out2) { + DeviceState *splitter = qdev_new(TYPE_SPLIT_IRQ); + + qdev_prop_set_uint32(splitter, "num-lines", 2); + + if (!qdev_realize_and_unref(splitter, NULL, &error_fatal)) { + return false; + } + + qdev_connect_gpio_out(splitter, 0, out1); + qdev_connect_gpio_out(splitter, 1, out2); + qdev_connect_gpio_out_named(src, outname, 0, + qdev_get_gpio_in(splitter, 0)); + + return true; +} + static void realview_init(MachineState *machine, enum realview_board_type board_type) { @@ -66,7 +86,6 @@ static void realview_init(MachineState *machine, DeviceState *dev, *sysctl, *gpio2, *pl041; SysBusDevice *busdev; qemu_irq pic[64]; - qemu_irq mmc_irq[2]; PCIBus *pci_bus = NULL; NICInfo *nd; DriveInfo *dinfo; @@ -229,14 +248,18 @@ static void realview_init(MachineState *machine, * and the PL061 has them the other way about. Also the card * detect line is inverted. */ - mmc_irq[0] = qemu_irq_split( - qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_WPROT), - qdev_get_gpio_in(gpio2, 1)); - mmc_irq[1] = qemu_irq_split( - qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_CARDIN), - qemu_irq_invert(qdev_get_gpio_in(gpio2, 0))); - qdev_connect_gpio_out_named(dev, "card-read-only", 0, mmc_irq[0]); - qdev_connect_gpio_out_named(dev, "card-inserted", 0, mmc_irq[1]); + if (!split_irq_from_named(dev, "card-read-only", + qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_WPROT), + qdev_get_gpio_in(gpio2, 1))) { + return; + } + + if (!split_irq_from_named(dev, "card-inserted", + qdev_get_gpio_in(sysctl, ARM_SYSCTL_GPIO_MMC_CARDIN), + qemu_irq_invert(qdev_get_gpio_in(gpio2, 0)))) { + return; + } + dinfo = drive_get(IF_SD, 0, 0); if (dinfo) { DeviceState *card; From patchwork Wed Mar 23 17:35:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zongyuan Li X-Patchwork-Id: 12790019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 917FAC433F5 for ; Wed, 23 Mar 2022 17:53:51 +0000 (UTC) Received: from localhost ([::1]:52934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX5B8-00037G-8T for qemu-devel@archiver.kernel.org; Wed, 23 Mar 2022 13:53:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX4uA-0008Iy-Ui for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:19 -0400 Received: from [2607:f8b0:4864:20::635] (port=34748 helo=mail-pl1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX4u9-0005Uj-JM for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:18 -0400 Received: by mail-pl1-x635.google.com with SMTP id i11so2215397plr.1 for ; Wed, 23 Mar 2022 10:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VkrhIhe7YG6BgM78VtHLUlMDvp0jiKNofViYVhBy1/U=; b=qNVxXYid4f/16xzVNs/iRGfRJPgcmWKGFlOjDzQgeIh67roBFhkrYI8UH1l8weVvel 1zthPzYsS8KW8Uv6S5mvFnERlSthed+P6pOhQzYFNdBwuaVH3K694RqLiyRrjSzLlifP BUnYyuPsWkkPZv3Sx/u+DmPQ9VJYS/BwS6ep1zx7badznB2wSy6F59EUiKeAax0USpek UKhHKiI6+3HnOXEmX9x0dzgwp5U3gNI0quDZwvBo3d99C2RY0xjL1Qs0ii1uGFPt4JGW XxJcdKtvAAbkxNNi5sQRKuBM8ol6v19eL7D2qQD4ieX4BE/Ya6Qwze7toJgpcxthUZmK /H4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VkrhIhe7YG6BgM78VtHLUlMDvp0jiKNofViYVhBy1/U=; b=3Oz6tbYa907InBgZMMCbrzX+u7tAqPkWkgCqIngBIOQhXbaAo8nA7L41TvHGU2MyyJ 2OxxpeDWR4ZBGHz+vYGOq2uq5ao18HndTfoUDjrfkltVo+ej3zs3yncKkcRcd1XTSUHF TtCYl8rvqHUF0dusoKYcrDupiCizvbkdFTVr/wVwirP0oSyIgIEsQX3EMxoqYTNGMxel XmXWZbHZE1BL8suWjUPx/oHsfJuLyif9AcFR9/AZyp5P9PtWbQNH07IekxNJGiWgvQ// wcY+UfQgTraWo6HdXF5ujqCMyq+tQuA/zyXvrCg+zRNBAZaJWkG0YY4WeOe+deheJjcN o72Q== X-Gm-Message-State: AOAM530XsTmF5irTlZp35RPhriZCOuayKVBtAkYDYdnAjMwy+lB5U0Qs bkV+dPK6CJhnN9Rmd/4FG9meBE2I/+t6fA== X-Google-Smtp-Source: ABdhPJxHDwYqLctuDaYvfKu3tSUO686BqEsY2/Kosnwxm/FJwE8hA9cNpyhIn4TNj5WgXEbHnm6Omw== X-Received: by 2002:a17:90b:3b44:b0:1c7:9ca8:a19e with SMTP id ot4-20020a17090b3b4400b001c79ca8a19emr3352514pjb.245.1648056976172; Wed, 23 Mar 2022 10:36:16 -0700 (PDT) Received: from dev.lizongyuan.local ([103.177.44.11]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm553239pfu.35.2022.03.23.10.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 10:36:15 -0700 (PDT) From: Zongyuan Li To: qemu-devel@nongnu.org Subject: [PATCH v3 2/5] hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' Date: Thu, 24 Mar 2022 01:35:40 +0800 Message-Id: <20220323173543.146442-3-zongyuan.li@smartx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220323173543.146442-1-zongyuan.li@smartx.com> References: <20220323173543.146442-1-zongyuan.li@smartx.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::635 (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::635; envelope-from=zongyuan.li@smartx.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Peter Maydell , "open list:Stellaris" , Zongyuan Li Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Zongyuan Li --- hw/arm/stellaris.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index b6c8a5d609..ccc2d5def2 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "hw/core/split-irq.h" #include "hw/sysbus.h" #include "hw/sd/sd.h" #include "hw/ssi/ssi.h" @@ -1023,6 +1024,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) I2CBus *i2c; DeviceState *dev; DeviceState *ssys_dev; + DeviceState *gpio_d_splitter; int i; int j; const uint8_t *macaddr; @@ -1237,9 +1239,20 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) &error_fatal); ssddev = ssi_create_peripheral(bus, "ssd0323"); - gpio_out[GPIO_D][0] = qemu_irq_split( - qdev_get_gpio_in_named(sddev, SSI_GPIO_CS, 0), + + gpio_d_splitter = qdev_new(TYPE_SPLIT_IRQ); + qdev_prop_set_uint32(gpio_d_splitter, "num-lines", 2); + if (!qdev_realize_and_unref(gpio_d_splitter, NULL, &error_fatal)) { + return; + } + qdev_connect_gpio_out( + gpio_d_splitter, 0, + qdev_get_gpio_in_named(sddev, SSI_GPIO_CS, 0)); + qdev_connect_gpio_out( + gpio_d_splitter, 1, qdev_get_gpio_in_named(ssddev, SSI_GPIO_CS, 0)); + gpio_out[GPIO_D][0] = qdev_get_gpio_in(gpio_d_splitter, 0); + gpio_out[GPIO_C][7] = qdev_get_gpio_in(ssddev, 0); /* Make sure the select pin is high. */ From patchwork Wed Mar 23 17:35:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zongyuan Li X-Patchwork-Id: 12790020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 996A8C433EF for ; Wed, 23 Mar 2022 17:55:03 +0000 (UTC) Received: from localhost ([::1]:55038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX5CI-0004X8-L5 for qemu-devel@archiver.kernel.org; Wed, 23 Mar 2022 13:55:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX4uH-0008VB-8H for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:25 -0400 Received: from [2607:f8b0:4864:20::42d] (port=38654 helo=mail-pf1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX4uF-0005VR-Nz for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:24 -0400 Received: by mail-pf1-x42d.google.com with SMTP id b15so2015324pfm.5 for ; Wed, 23 Mar 2022 10:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GCsELW2QXqJF8bCAIFTcBQvHzfwsRKTCwEsXwAqek4w=; b=8G1Fo/LtG+qvDUJoacfKR5i0ISORzoj/q0mLJFWlp7UCcqBq8Tw1PLwhHODtHdJvn/ Na+9mBMqkYTDBSx7F3kCfm6KE41HBhVus8t3EflXRhRgCsepMjzjlCDdyieE9egYoBoB ahtzQowWnAA+lVhVfDicbWzT9fXLn5Ueiv+LzNw1Bbpbon0epS/MV6ifXyW7kyvP8n1L YcjVDfg+N7Pl7/uMlb9LA8Aqv9jDXnRwL2uRErrFxLku3bAA4J5wHF/e3FEfMIPnOvA2 LMUPqQSd51l1/6QYApGdGdpi9yi2JMrEN3n0oGDmnnZuZSgGhuvSqFBWsAHseav18bKR 35kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GCsELW2QXqJF8bCAIFTcBQvHzfwsRKTCwEsXwAqek4w=; b=2/4HD3oqFgVN0E4wpZm7EWOuy3eCljoybh+udchf6NoiFTL1bUubSEvH5RU8gbMvtD 8nmV5Lpzc9ZIFH0SA583JP1LrXWlJAbyvJe53bftbvkBqKmL4O4C7aYOBNz1Hq7Fg5Lh F9P4uUVPszScIAbCouiBDRbkuRjl4fPhNCcxpw/pnWBvNs5HzYrWczq+M3O3MFk77toF wmD4Db00sYPNwB32U9py+p3oOQsvwtu5/RrQqPIV0Cehnbm1jO8/qnpTL5JPUzfWNGf8 VjiGkyuFoaKt3kljcrIcMX18ZJARF6rlRcWVZvwbGNGaW7jZ5OVM8p0+dalfTIgoEOz4 eR4w== X-Gm-Message-State: AOAM530EB3RPuN1/uaXlljaD0tULO1qRi5d1/jvWKjIhTvh+xA9gp6gN vLg3xpiDBKDVZnHDosIBs5snTbbSG8bggA== X-Google-Smtp-Source: ABdhPJzphzNzX2yfXcbFXBPXl5A/SpIIQnOAMfQpwd+vopzjt8s46NdLQrLIHEwE1PsytbmHivGG+w== X-Received: by 2002:a63:481b:0:b0:378:9b24:5163 with SMTP id v27-20020a63481b000000b003789b245163mr782851pga.224.1648056982228; Wed, 23 Mar 2022 10:36:22 -0700 (PDT) Received: from dev.lizongyuan.local ([103.177.44.11]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm553239pfu.35.2022.03.23.10.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 10:36:21 -0700 (PDT) From: Zongyuan Li To: qemu-devel@nongnu.org Subject: [PATCH v3 3/5] hw/intc/exynos4210_combiner: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' Date: Thu, 24 Mar 2022 01:35:41 +0800 Message-Id: <20220323173543.146442-4-zongyuan.li@smartx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220323173543.146442-1-zongyuan.li@smartx.com> References: <20220323173543.146442-1-zongyuan.li@smartx.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::42d (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::42d; envelope-from=zongyuan.li@smartx.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Igor Mitsyanko , Peter Maydell , "open list:Exynos" , Zongyuan Li Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Zongyuan Li --- hw/intc/exynos4210_combiner.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 4534ee248d..18dade35d3 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -31,10 +31,12 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/module.h" +#include "qapi/error.h" #include "hw/arm/exynos4210.h" #include "hw/hw.h" #include "hw/irq.h" +#include "hw/core/split-irq.h" #include "hw/qdev-properties.h" #include "qom/object.h" @@ -105,6 +107,22 @@ static const VMStateDescription vmstate_exynos4210_combiner = { } }; +static qemu_irq split_irq(qemu_irq out1, qemu_irq out2) { + DeviceState *splitter = qdev_new(TYPE_SPLIT_IRQ); + + qdev_prop_set_uint32(splitter, "num-lines", 2); + + if (!qdev_realize_and_unref(splitter, NULL, &error_fatal)) { + hw_error("exynos4210.combiner: unable to realize split irq device"); + return NULL; + } + + qdev_connect_gpio_out(splitter, 0, out1); + qdev_connect_gpio_out(splitter, 1, out2); + + return qdev_get_gpio_in(splitter, 0); +} + /* * Get Combiner input GPIO into irqs structure */ @@ -132,48 +150,48 @@ void exynos4210_combiner_get_gpioin(Exynos4210Irq *irqs, DeviceState *dev, /* MDNIE_LCD1 INTG1 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(1, 0) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(1, 3): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(0, bit + 4)]); continue; /* TMU INTG3 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(3, 4): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(2, bit)]); continue; /* LCD1 INTG12 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 0) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 3): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(11, bit + 4)]); continue; /* Multi-Core Timer INTG12 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 4) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(12, 8): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]); continue; /* Multi-Core Timer INTG35 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(35, 4) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(35, 8): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]); continue; /* Multi-Core Timer INTG51 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(51, 4) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(51, 8): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]); continue; /* Multi-Core Timer INTG53 */ case EXYNOS4210_COMBINER_GET_IRQ_NUM(53, 4) ... EXYNOS4210_COMBINER_GET_IRQ_NUM(53, 8): - irq[n] = qemu_irq_split(qdev_get_gpio_in(dev, n), + irq[n] = split_irq(qdev_get_gpio_in(dev, n), irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]); continue; } From patchwork Wed Mar 23 17:35:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zongyuan Li X-Patchwork-Id: 12790021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D1DB0C433F5 for ; Wed, 23 Mar 2022 17:56:14 +0000 (UTC) Received: from localhost ([::1]:57130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX5DR-0005xA-QS for qemu-devel@archiver.kernel.org; Wed, 23 Mar 2022 13:56:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX4ub-00017i-7J for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:45 -0400 Received: from [2607:f8b0:4864:20::1029] (port=42533 helo=mail-pj1-x1029.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX4uK-0005Xj-RQ for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:36:44 -0400 Received: by mail-pj1-x1029.google.com with SMTP id o3-20020a17090a3d4300b001c6bc749227so2544050pjf.1 for ; Wed, 23 Mar 2022 10:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2EsJ9w4OtAe62QE/DTZfa1jMS0xrU6YKS1g+C71i9i0=; b=zCGPEDVJ5j3EC41nOk4QuQmCLFTk53zzMU3Ql176m0Y1S2MTJ5ZY2xhCTiRzMotFvl npA2hcQUbmlUwa4GmLxdaXLuc0jdskSRZPgPzahpxNK0aRzCJbOQqGP+BD5+Bs8CvsG6 SmjcuZzbkkYZXau5WnywH9kompyxYEO8JvDbmYXi+7KdHIwsD0uHHec0x10Mt5thUk/Z Pu4taNH5E65PH+SQGttNQu0PlQ0ab8yco8Kx9OZjfCTSS8kH6t1L6W4Td6aYL+FMaGxm iS1py578GyQtem+63rKDUL+jXPbLyozBrhdrlN4OcfY7A8HzpXAGQJ5ZQ4A/QXQBp7Gp qyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2EsJ9w4OtAe62QE/DTZfa1jMS0xrU6YKS1g+C71i9i0=; b=GSwOqKMkbVORvSJ3PKJzPEg2a8NciBN8V1DpSLfaa94+AB+skKuypbUqTfSuKrYgVQ 155ch5o1NulcB5WKTUXOnbioQAtD8XmFuNTy2i9PTx5geU+zqj4oY4LLGWpGFfS9+B6A hI353PnjGcYU1E5Y4IQAOe9BKwKSCgGpgQupxISmkdrB1Z1A0TKImTBiuSKtI1KFzzp5 bcRlyKJbvCLX0C5a/l3MzZiOs9b0wx0+T0cYVSY9I6z4JPXXRFHbbIN+/uVLOQWH5qi9 pDlfQ/vA3OVFrpLoUIXk47pkgZ0jlbpEC2lxIadokh+mbZ4Ocn7IvRqeQTpa7htwU/Jk Hz/w== X-Gm-Message-State: AOAM533tA9nmYhiJvkJv+pBbYtTCaMp4l44kw8oXdD7Z895Jporr2qpV eocGMkZuiD9aUNfZUEWhNr/RPzmTXGW2DA== X-Google-Smtp-Source: ABdhPJwAlNcxtavjyj0HOqkLfXf9kkDhzB7jQYB+HGNIcmPI2f6EL5/iuD8dxf0dSjpsvlcqG+LDwA== X-Received: by 2002:a17:90a:7ac2:b0:1bf:3573:179b with SMTP id b2-20020a17090a7ac200b001bf3573179bmr892742pjl.216.1648056987360; Wed, 23 Mar 2022 10:36:27 -0700 (PDT) Received: from dev.lizongyuan.local ([103.177.44.11]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm553239pfu.35.2022.03.23.10.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 10:36:26 -0700 (PDT) From: Zongyuan Li To: qemu-devel@nongnu.org Subject: [PATCH v3 4/5] hw/intc/exynos4210_gic: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' Date: Thu, 24 Mar 2022 01:35:42 +0800 Message-Id: <20220323173543.146442-5-zongyuan.li@smartx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220323173543.146442-1-zongyuan.li@smartx.com> References: <20220323173543.146442-1-zongyuan.li@smartx.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1029 (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::1029; envelope-from=zongyuan.li@smartx.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Igor Mitsyanko , Peter Maydell , "open list:Exynos" , Zongyuan Li Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Zongyuan Li --- hw/intc/exynos4210_gic.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index bc73d1f115..d8ecb9fae3 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -29,6 +29,8 @@ #include "hw/qdev-properties.h" #include "hw/arm/exynos4210.h" #include "qom/object.h" +#include "hw/hw.h" +#include "hw/core/split-irq.h" enum ExtGicId { EXT_GIC_ID_MDMA_LCD0 = 66, @@ -209,6 +211,23 @@ qemu_irq *exynos4210_init_irq(Exynos4210Irq *s) EXYNOS4210_MAX_INT_COMBINER_IN_IRQ); } + +static qemu_irq split_irq(qemu_irq out1, qemu_irq out2) { + DeviceState *splitter = qdev_new(TYPE_SPLIT_IRQ); + + qdev_prop_set_uint32(splitter, "num-lines", 2); + + if (!qdev_realize_and_unref(splitter, NULL, &error_fatal)) { + hw_error("exynos4210.combiner: unable to realize split irq device"); + return NULL; + } + + qdev_connect_gpio_out(splitter, 0, out1); + qdev_connect_gpio_out(splitter, 1, out2); + + return qdev_get_gpio_in(splitter, 0); +} + /* * Initialize board IRQs. * These IRQs contain splitted Int/External Combiner and External Gic IRQs. @@ -230,10 +249,10 @@ void exynos4210_init_board_irqs(Exynos4210Irq *s) irq_id = EXT_GIC_ID_MCT_G1; } if (irq_id) { - s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n], + s->board_irqs[n] = split_irq(s->int_combiner_irq[n], s->ext_gic_irq[irq_id-32]); } else { - s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n], + s->board_irqs[n] = split_irq(s->int_combiner_irq[n], s->ext_combiner_irq[n]); } } @@ -245,7 +264,7 @@ void exynos4210_init_board_irqs(Exynos4210Irq *s) EXYNOS4210_MAX_EXT_COMBINER_OUT_IRQ][bit]; if (irq_id) { - s->board_irqs[n] = qemu_irq_split(s->int_combiner_irq[n], + s->board_irqs[n] = split_irq(s->int_combiner_irq[n], s->ext_gic_irq[irq_id-32]); } } From patchwork Wed Mar 23 17:35:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zongyuan Li X-Patchwork-Id: 12790015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 36D9CC433EF for ; Wed, 23 Mar 2022 17:45:54 +0000 (UTC) Received: from localhost ([::1]:46696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX53R-0006G7-06 for qemu-devel@archiver.kernel.org; Wed, 23 Mar 2022 13:45:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX4vT-0002et-Jh for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:37:39 -0400 Received: from [2607:f8b0:4864:20::630] (port=43769 helo=mail-pl1-x630.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX4vR-0005iD-Qy for qemu-devel@nongnu.org; Wed, 23 Mar 2022 13:37:39 -0400 Received: by mail-pl1-x630.google.com with SMTP id w8so2194883pll.10 for ; Wed, 23 Mar 2022 10:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AOL9NtYfd3bDRvXkeA7t/+Y1sU79nqDVVqBTzIOcqRk=; b=arBhUosiXVq1AGwQFuvnjee4LVQuG+pOtEAFI7JNzceVEohrbNuJBF8KWTeP8scxfJ duxqLnS6K94JMAXtXZtgy/dZEhVrPEY77GIItlz3AHH6cuc5Inn05SG3PzV8tWYJEAuc VczcpDi81fYLroEqvutbCNX+5bOQz1PxQxx49SiGwS/hDHEPDWKzrJjzaY+VZZhE1oZN 5PUms/5OyXuywsf08uO8n1Ij/8DgPYk4o7dYz0yOSDm7j5YyBnd1+GwSk47KCF0TCHXP yx2O5bLlFgMRmMLMzRQRNWKClMxdBabrR+XqaU06225GxKCrmoNbKE6KPqO/O+FvcW2F 7K5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AOL9NtYfd3bDRvXkeA7t/+Y1sU79nqDVVqBTzIOcqRk=; b=SXPAXKmDV7jsZygKmFxT4JJTD4q54u+eftLb/ukEbFBCF37WHCe6B/o562KyLNdm1o /wjwca0WzkwRYd+4xoFb+CQecC6mp6RjIyCP+BQBFECbsfaW690tC9g6W3LiekBFyB0s guvlaaNM6J58ZlxM69ggPjW+UlCoqZpJjqEkdbeul4PgxfJWNEZx+0Hb/2HS4R025xvs ZcVmpyXNyNAe9m1FB7emIAn8gnelxBUw4NEgdH17bhvnZF9hcPxMbkW4o2N0rlQqcJco AyrhMOLYwsH1gp1Wqa/xcrrPgxDPCx6kJwGVukxFXWQ4H1E9U3DROM2VZ4+Mm8W0IXwR QmpA== X-Gm-Message-State: AOAM530kHG3ky9oS6H2fKU03MTLNEIguRafbB06WMJ9jFnf5kdUQEGfM X8jVvGrXmBuJ/t2qK0gIa+Pre+l7EbqW0g== X-Google-Smtp-Source: ABdhPJxZ3T9NcYv0Qy5vy6wcfke8sYjvzFEHLe8MNKRUryh+wYUdPZgS2YSnL2DlZPWwVWBGH1J4Tg== X-Received: by 2002:a17:90a:9412:b0:1bc:f629:43bc with SMTP id r18-20020a17090a941200b001bcf62943bcmr13046457pjo.103.1648057055965; Wed, 23 Mar 2022 10:37:35 -0700 (PDT) Received: from dev.lizongyuan.local ([103.177.44.11]) by smtp.gmail.com with ESMTPSA id w19-20020a056a0014d300b004fae5e3970csm553239pfu.35.2022.03.23.10.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 10:37:35 -0700 (PDT) From: Zongyuan Li To: qemu-devel@nongnu.org Subject: [PATCH v3 5/5] hw/core/irq: remove unused 'qemu_irq_split' function Date: Thu, 24 Mar 2022 01:35:44 +0800 Message-Id: <20220323173543.146442-6-zongyuan.li@smartx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220323173543.146442-1-zongyuan.li@smartx.com> References: <20220323173543.146442-1-zongyuan.li@smartx.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::630 (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::630; envelope-from=zongyuan.li@smartx.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Peter Maydell , Zongyuan Li Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Zongyuan Li Resolves: https://gitlab.com/qemu-project/qemu/-/issues/811 Reviewed-by: Peter Maydell --- hw/core/irq.c | 15 --------------- include/hw/irq.h | 5 ----- 2 files changed, 20 deletions(-) diff --git a/hw/core/irq.c b/hw/core/irq.c index 741219277b..3623f711fe 100644 --- a/hw/core/irq.c +++ b/hw/core/irq.c @@ -106,21 +106,6 @@ qemu_irq qemu_irq_invert(qemu_irq irq) return qemu_allocate_irq(qemu_notirq, irq, 0); } -static void qemu_splitirq(void *opaque, int line, int level) -{ - struct IRQState **irq = opaque; - irq[0]->handler(irq[0]->opaque, irq[0]->n, level); - irq[1]->handler(irq[1]->opaque, irq[1]->n, level); -} - -qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2) -{ - qemu_irq *s = g_new0(qemu_irq, 2); - s[0] = irq1; - s[1] = irq2; - return qemu_allocate_irq(qemu_splitirq, s, 0); -} - void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n) { int i; diff --git a/include/hw/irq.h b/include/hw/irq.h index dc7abf199e..645b73d251 100644 --- a/include/hw/irq.h +++ b/include/hw/irq.h @@ -46,11 +46,6 @@ void qemu_free_irq(qemu_irq irq); /* Returns a new IRQ with opposite polarity. */ qemu_irq qemu_irq_invert(qemu_irq irq); -/* Returns a new IRQ which feeds into both the passed IRQs. - * It's probably better to use the TYPE_SPLIT_IRQ device instead. - */ -qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2); - /* For internal use in qtest. Similar to qemu_irq_split, but operating on an existing vector of qemu_irq. */ void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n);