From patchwork Thu Apr 21 11:18:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 564333 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp355224map; Thu, 21 Apr 2022 04:41:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUAJ6oRB12WJR2EZkDK1CETLcDymG5+QGV4/3jf8urSYgzZxX5yThgsNDz+XuwtLi45UkQ X-Received: by 2002:a05:6214:5016:b0:446:33d5:c935 with SMTP id jo22-20020a056214501600b0044633d5c935mr18926129qvb.18.1650541279919; Thu, 21 Apr 2022 04:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650541279; cv=none; d=google.com; s=arc-20160816; b=jE+uINb8hCwSp6OC/5JPkpf9JOooc8mrZ45bn9YxYSD82339PQKlI4GsK6SC9baQvn YQYzili1q8Pl5T1oUCRllWMLzjp1dihrGV2Ahl5r2Ze3XF86U7gPbCOcBK8iHmkseRLI Surlq+64pht9Y//Ms1oSITfK1e+yiD5njkRocUP8TlduwZSfZu61a1jhkhDSljGOrIaS E4OmQR2Kys+2GTUVYsA4YYd7R9vd9s0OuSdLZLMaCYTr2cHZxYEcH+qlvanjWsZJMAQ+ vRSgf0TFhjDDVayNLt2uWFhpTKCF7in1l1da6/b1R/O6AnL63tqlgnVgdGv9lIWbNd6E Ez4w== 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:to:from :dkim-signature; bh=uM2Z8pOmM345Tmz6p1sACjfjRoZTp+FYU6GMrrVCQUQ=; b=NJ1w5kEcMJ5EnJ/41/djkOmBKJEjKA3zt1vzWcVN0mW8iGThjz9MimEsvzyVHCFceK kDXoh3w40vJHKGtZayXMFDR2jomBjnSuZ5LcL9VdheilzkYKTv7FFndCpwZ/FnSGT1VJ zWul6nx2vLsGE0eDZ7Nds1eDH9XQZYMMyK9YzuPUmEhAvH6VnYe+GbNY0MnFvGHKutUs ynbNsORAUO4bExYhf1h19vzIrmXhLfXuW72I+Z4bShgpg2eVcnOd1NuMUHFKQgsqmlN/ VWf9jilV8tO5cR1rOmmRTnimDl/CnQaOfoMTpY22KiX2Jsckk8WNi4IfIFrnT4ScXH7I BQbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HHP4jVN5; 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 z17-20020a376511000000b0069c5a280b7bsi1234968qkb.405.2022.04.21.04.41.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Apr 2022 04:41:19 -0700 (PDT) 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=HHP4jVN5; 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]:45170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhVBX-00018F-Hd for patch@linaro.org; Thu, 21 Apr 2022 07:41:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhUqU-0003MM-Ik for qemu-devel@nongnu.org; Thu, 21 Apr 2022 07:19:35 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhUqR-0003Xx-Ps for qemu-devel@nongnu.org; Thu, 21 Apr 2022 07:19:34 -0400 Received: by mail-wr1-x42a.google.com with SMTP id h25so177568wrc.13 for ; Thu, 21 Apr 2022 04:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uM2Z8pOmM345Tmz6p1sACjfjRoZTp+FYU6GMrrVCQUQ=; b=HHP4jVN51SEgdlWe4LzqFH5voCB/4YczYRRrdxwYWYgCT6M5jvbyi9c/KfFDNOUnnT vzkVdOX65/0Jyv3u2D2uEujgNdJGqgQIWG2YsHc6G6vCiWhk1BbMLKkD6e43Gd7pqAyH JKPZKFRFRE6SWP6uqm2vyQm4MJqZpe0toM3B/SnCVutKcbmif3LTooz8TYYyZyL2n9Fn 0MxAJxUwarv8Q6PJptvD1VNxiiyBozdsNS8RVKbaNVQSM+eVM5MJJVmmPUqlceBppmOa Q5XrV9pAAVdu9+sas4aDVhCu5p569eXoTdfByLh9r17RtqgSb1k1sVY6nStzS2Eq0ty9 bFnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uM2Z8pOmM345Tmz6p1sACjfjRoZTp+FYU6GMrrVCQUQ=; b=h73WlVWiO7RxXRV92qtZpyJOIvacA91uCTCawCZRiGDDSvyLZX94MSFBVuCsAZYlG3 EKAvPx94YdIr34im87a51pHGI0x0OAXJ6kZkFkEHapDL6zdoIoA1MGDpJj6x+7UFl33d uMC9JVj2gIBqu6e5RuMqWOJANOlHja/kUkZlWUBmDEhgaR+2R2PRw9CVCvTN5nDfRj1V urVQe9zE+YgCAVreOlJ1DHx1jahZ6JI2fwh8qtv8Si8jq/UO2L5K+0Uc4EnkIm4O+/Me 12D6aAtuKCCPxLAoIKfSy6W8/JvbEiCeKmKVRmBCP8VM6zpfMY+Vns+p8hUmrbK/TzZH +L9A== X-Gm-Message-State: AOAM530jgbVYcW0FUzsA96tXs3UpLgJN7/j0pOUFwqCxU47/JxPy6rzL Dg9Nk/Brq+/merQaWCZraqoj3lpE7Pu/zQ== X-Received: by 2002:a5d:64a3:0:b0:20a:7931:5b84 with SMTP id m3-20020a5d64a3000000b0020a79315b84mr19823553wrp.407.1650539954144; Thu, 21 Apr 2022 04:19:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e4-20020a5d6d04000000b0020a8bbbb72bsm2597694wrq.97.2022.04.21.04.19.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 04:19:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 27/31] hw/arm/stellaris: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ' Date: Thu, 21 Apr 2022 12:18:42 +0100 Message-Id: <20220421111846.2011565-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421111846.2011565-1-peter.maydell@linaro.org> References: <20220421111846.2011565-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Zongyuan Li Signed-off-by: Zongyuan Li Reviewed-by: Peter Maydell Message-id: 20220324181557.203805-3-zongyuan.li@smartx.com Signed-off-by: Peter Maydell --- hw/arm/stellaris.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index b6c8a5d6098..12c673c9172 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" @@ -1160,6 +1161,7 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) DeviceState *ssddev; DriveInfo *dinfo; DeviceState *carddev; + DeviceState *gpio_d_splitter; BlockBackend *blk; /* @@ -1237,9 +1239,18 @@ 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); + qdev_realize_and_unref(gpio_d_splitter, NULL, &error_fatal); + 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. */