From patchwork Tue Jul 16 18:09:29 2024 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: 812776 Delivered-To: patch@linaro.org Received: by 2002:a5d:42c4:0:b0:367:895a:4699 with SMTP id t4csp435276wrr; Tue, 16 Jul 2024 11:10:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWxMAEJK3oVP9jBhNNfzAxoflFCdzfMcDmRiy7ZwCihbkemgD6oANmRTzlorxrAiVS7RSIsj6Qs3aYCABFQBTee X-Google-Smtp-Source: AGHT+IFkG2WJi5yRGZn/YiuYwaVMrv/rA86WAYGhl1eDYSGzjHQjkuRUgSkd/Y4XDCJg9ueq+q3s X-Received: by 2002:a05:6214:e47:b0:6b0:62bb:ab9a with SMTP id 6a1803df08f44-6b77f4dbf86mr40590856d6.19.1721153439206; Tue, 16 Jul 2024 11:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721153439; cv=none; d=google.com; s=arc-20160816; b=ybVFX8CrZZQyet9MpswpwtGqWK9k8P4WF+QRKw4UxVIV6gWNwCtOMHvqfssD4v16uR r8p3g1kGTdtZYczIUzULfI4giuk/XX1NYr3mIYaWDjb2VyvkSQsQ5rNqCKC0/2fgJHVb rN6z7t+hx19SWZ7B27VeOPv069dnamfs/LEmvRGtNSBI3hLjEcxyrgX4rBORRyggF4BV NP/RQQErAfZVD0LxYHYUcFChwNsD3M4Nzrs0dXHRcGTKW+50rDotYJrEHqYujAsWUyug 2TsU5X86y6tdSIjmfaT0mmLEpTV49qbuCrzXEivqlzjeHVuzwKIXqyUJcC8sGGBkTTeg bF9w== 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=sasciBya2HV1iigybBBfHdwHjguksb3KeHQbVPO+dbY=; fh=Tr7NIUtXAhmtWFkJJjP6G2+mN+Bis7DT7Z3/vsFybJ4=; b=aCMMUNlmShlWX5EWLrvyis6GDQOC2A/dCyodJ1Rcl7+B06xkN9gF7OjkE9yGi/g3Eh nDkZVHTvwrn+XQ90Afbe9rS4qd4CAAcK8rOGMQynA7tCJAi8m4uw5LmwT95wCKpGQ4EJ vVYVGne+MGYi3JHPC7mwoGVc1EnDjbeDCktM/e62CKmxae+v5NqAg3B8xIB6WD0kXa1h MffNn8zbDyOOb4THSi8Ubw5IOfk8q2AY1j9M5IvykO10bwBpSP62PewPsE2aoiKfLgcF Nc0jx7AspRoYZL3lz8r/YFzXNLMxgeje9C4iv+PN3hH8UNT9TRtm3uFpvfn5DvYFoW76 yjPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=foVM5Fb6; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b761a5d1d6si80275416d6.501.2024.07.16.11.10.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Jul 2024 11:10:39 -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=foVM5Fb6; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTmcj-0006UP-ME; Tue, 16 Jul 2024 14:10:01 -0400 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 1sTmch-0006Jm-5u for qemu-devel@nongnu.org; Tue, 16 Jul 2024 14:09:59 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sTmcf-0000uA-0l for qemu-devel@nongnu.org; Tue, 16 Jul 2024 14:09:58 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-427aeebaecdso16860645e9.1 for ; Tue, 16 Jul 2024 11:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721153395; x=1721758195; darn=nongnu.org; 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=sasciBya2HV1iigybBBfHdwHjguksb3KeHQbVPO+dbY=; b=foVM5Fb6P/vCLvrpC461DSE9E+gXEVZirL+ZC8I528nRwtIa0El1fslKMt6qnLlSD0 3/Zys9tUIokhxJj77PB+QtF7MkScROmhy9W5/1nTu04UGB2dJgmpJPVOinvN6mgptBRE Z+I2YcGFekHAnD/eAD09hFEwkdUQIQP6G7/ZNJUnBWBAHfZT4xUSqOeeEwgRpUEHG5CU 9u14TMgsyEE64ZRNazVU4KGJ7lZg2wedlgUKPp6A4DcYOoG14bMXR5Pfe14fZG8qsGT0 hrEm3vfRlWtA/swC7g/3lGxbfGH3unFy5xr/SgwdYzRReZNIMEtlM/G+0HFaXfXAWc2S 5OSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721153395; x=1721758195; 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=sasciBya2HV1iigybBBfHdwHjguksb3KeHQbVPO+dbY=; b=sIZA8yT/IpjLwnKvGZt/qczdhMDamqKgk4N5Jws9ee38XKiZJmcOLBSoQHPl83+q4H P5AdfeaR35HrcoYKuiNadtB6eovwo5r0/X0d88CKRZfpdgfjS9mlsOc82uFDx0NEZoJ8 e1+mKiwlwLWUwZfoTFPSc4sURH8qRohqomxQHjHrfhk3xN54v8nxkxeH69Qv1Iqz6tCh Ar/wBTZmYn3iVimPgr2oMC5lxJmNAJOghA3DTnao/GC2VlaPv3jB2PklnuF747Qc6Gqt CG8sWRS/mgI3sk2X0jmIDCCHVObBP32W3aPAFacOAHfPdvo8CYwYvSySG1ksCI90DXBT Gf2Q== X-Gm-Message-State: AOJu0YzvxAn6+sHhZ1W4lqdiaFcR7ZLl8NMmNZy0tR4cX4m5KdKBu3aW UV3hy71nCYHWjp6R5VngflvBXylZkJgjOTfFKIhKbOwr9PDUSx4nzpEgf7G24dY7v8uVFpiQaiR sMDhJfg== X-Received: by 2002:a05:6000:2c6:b0:367:9903:a81 with SMTP id ffacd0b85a97d-368261df9fcmr2732143f8f.43.1721153395073; Tue, 16 Jul 2024 11:09:55 -0700 (PDT) Received: from localhost.localdomain ([176.187.209.82]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dafbea9sm9777803f8f.82.2024.07.16.11.09.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jul 2024 11:09:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bernhard Beschow , BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/13] hw/isa/vt82c686: Turn "intr" irq into a named gpio Date: Tue, 16 Jul 2024 20:09:29 +0200 Message-ID: <20240716180941.40211-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240716180941.40211-1-philmd@linaro.org> References: <20240716180941.40211-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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-bounces+patch=linaro.org@nongnu.org From: Bernhard Beschow Makes the code more comprehensible, matches the datasheet and the piix4 device model. Signed-off-by: Bernhard Beschow Reviewed-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240704205854.18537-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 2 +- hw/mips/fuloong2e.c | 2 +- hw/ppc/amigaone.c | 5 +++-- hw/ppc/pegasos2.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 8582ac0322..505b44c4e6 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -719,7 +719,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp) ISABus *isa_bus; int i; - qdev_init_gpio_out(dev, &s->cpu_intr, 1); + qdev_init_gpio_out_named(dev, &s->cpu_intr, "intr", 1); qdev_init_gpio_in_named(dev, via_isa_pirq, "pirq", PCI_NUM_PINS); isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d), diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index a45aac368c..6e4303ba47 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -299,7 +299,7 @@ static void mips_fuloong2e_init(MachineState *machine) object_resolve_path_component(OBJECT(pci_dev), "rtc"), "date"); - qdev_connect_gpio_out(DEVICE(pci_dev), 0, env->irq[5]); + qdev_connect_gpio_out_named(DEVICE(pci_dev), "intr", 0, env->irq[5]); dev = DEVICE(object_resolve_path_component(OBJECT(pci_dev), "ide")); pci_ide_create_devs(PCI_DEVICE(dev)); diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c index ddfa09457a..900f93c15e 100644 --- a/hw/ppc/amigaone.c +++ b/hw/ppc/amigaone.c @@ -153,8 +153,9 @@ static void amigaone_init(MachineState *machine) object_property_add_alias(OBJECT(machine), "rtc-time", object_resolve_path_component(via, "rtc"), "date"); - qdev_connect_gpio_out(DEVICE(via), 0, - qdev_get_gpio_in(DEVICE(cpu), PPC6xx_INPUT_INT)); + qdev_connect_gpio_out_named(DEVICE(via), "intr", 0, + qdev_get_gpio_in(DEVICE(cpu), + PPC6xx_INPUT_INT)); for (i = 0; i < PCI_NUM_PINS; i++) { qdev_connect_gpio_out(dev, i, qdev_get_gpio_in_named(DEVICE(via), "pirq", i)); diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index c1bd8dfa21..9b0a6b70ab 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -195,8 +195,8 @@ static void pegasos2_init(MachineState *machine) object_property_add_alias(OBJECT(machine), "rtc-time", object_resolve_path_component(via, "rtc"), "date"); - qdev_connect_gpio_out(DEVICE(via), 0, - qdev_get_gpio_in_named(pm->mv, "gpp", 31)); + qdev_connect_gpio_out_named(DEVICE(via), "intr", 0, + qdev_get_gpio_in_named(pm->mv, "gpp", 31)); dev = PCI_DEVICE(object_resolve_path_component(via, "ide")); pci_ide_create_devs(dev);