From patchwork Wed May 31 22:33:38 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: 687320 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp36655wru; Wed, 31 May 2023 15:35:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4O+5o7cldgTFfyulEeB02YOnID0hLfu3mmQYUAEFzCp9DJFE/NsKZ68KwFTY6L/yhU1v9R X-Received: by 2002:ad4:5ec7:0:b0:625:aa48:fb71 with SMTP id jm7-20020ad45ec7000000b00625aa48fb71mr9517846qvb.59.1685572519462; Wed, 31 May 2023 15:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685572519; cv=none; d=google.com; s=arc-20160816; b=FIxeBgYUHzOuU9ZI5sImrLvSeWWsHYVjPYEVMXYzAh5pFWtz31LEmbU6ZOdXDMgpy5 tHc1lvrP59t/BuM01gOaltzv0gj1MJzs1BCk9RGcwmnVZz6xCMxF29B+NFgLIMleSla4 rRDBvs/3oJQZUMHiVoSSCHAFK1O1huw45eDY/f3oeYnF5cnKxRAvdoPoaTCAtoeyo2jz 4AXpS951Twc9TxQdCN5WgeIquek9DxO86odRwpBsIzicpSqaahJjB0ajvIeRqWsQKXB9 hod+rJ6+h4AnHpzKc6m3w/2EHoCZS9+53f+fcxFrUVdnfmmVNKDEw8xFZELjYQvhrq9d P68Q== 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=b5ueUgIQTlD0vpS7sELdcFGXSEew10rN9NLHJA/jJ1g=; b=bFfcwCjTeJ7dhuqz0X3OKAh5gryqv6YfgK36SpN1gNmI2QJiiZ7sxn+GAWIh8tAW/E 5NhRU9k4++R/oMbFTMFrg82f8JlU+S/5zVXrjPiiBndNQBIgepJe2ve2+3A1gZpOTOqL ekhFZANWKvwWD1/a243NXS4iBcUHDLFm2k45tuMteBhmh+Si/lEYMHz5ZyBi6zYp4oX4 japyNvacRN2FRql+TaNSZgje+/gaSZBLa1/7Q3ZxVfegBpQSkK+t6h8HchQIsYbsdBRA U5cEMDxIE6txK22AM4/wttpg4Ao4EPbkwtGWcAcRAUF3e2SPz3VbFf3/ebWGsvu/TIPC XzTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jHMY5DoT; 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 gw11-20020a0562140f0b00b0062613d09f90si7309852qvb.239.2023.05.31.15.35.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 May 2023 15:35: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=jHMY5DoT; 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 1q4UOQ-0003Mm-Vz; Wed, 31 May 2023 18:34:11 -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 1q4UOO-0003Ae-RC for qemu-devel@nongnu.org; Wed, 31 May 2023 18:34:08 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4UOM-00054j-Kn for qemu-devel@nongnu.org; Wed, 31 May 2023 18:34:08 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-3f603ff9c02so1845285e9.2 for ; Wed, 31 May 2023 15:34:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685572445; x=1688164445; 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=b5ueUgIQTlD0vpS7sELdcFGXSEew10rN9NLHJA/jJ1g=; b=jHMY5DoTxQ7YAUVMoM48yiG7puIlcKtdgWhlj2cFlzMDgEbz00rQ4sg1k1sZwi9FKO FgBsAKh2MXxTclcZn89RPydJOA9wNCyABqDCLCq7Ecfd3wx7XBY1oCzwNaFY/UW06hFj fUrRv9ApXiEVg2MWxfgFbNsnyyVefp/AHy0dl6WrmoAkxVKMjniJzY3ZCdG5rtemNPwD mU/ARzFyn/2cmcddYGAraxK/74rdNrtXDb2Xhd/xKDqTT6rvYqCi3/xowsn7/96ASkCy rXyKBPuV6uA2tYwHX34JNzCaUSJf6bcCT8Slxu5GDYufDWGecwY38YbNxVQ7fmJc6AFA VWoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685572445; x=1688164445; 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=b5ueUgIQTlD0vpS7sELdcFGXSEew10rN9NLHJA/jJ1g=; b=bybk8gfV2mACFzH7feqCOJnLPPasrKbpQdqyEPCNNcYf4ULhJ5WI5AgHI1uVRtmPmh hUbGSxFjU5s/8xybPuiTidUaBB7aglL7vYbHER33NXvzia+u35MDF6imX00C5oQYJD4g Y1YT7K2px3nLfZkoBImnoWFDLnhUUzupbgnBIRAUDQJ2oG5CqPNi/oqCEecIa5XNJn4f 3m6WUuG98eSGq0fZPaCwuClK3fmD6MkWOg805IxP08Z6DUBNQ+6GtDxRE6oDZrexTqCu BSAwFsBOylZpu3pePEHzNnj6YJUXLwlOpe8aIc5SHgS9psYLrOrE4Fx4D8naEkiL3RcI l9hg== X-Gm-Message-State: AC+VfDxl9//EZpoG0ng/S91RBe+qiZWcGGahDVuDnGF5yjLkNmu/jibr Ex+QEVkNtot6VKWQmB34e90kl9g44oMeT0T3kRM= X-Received: by 2002:a05:600c:3650:b0:3f6:2d8:4823 with SMTP id y16-20020a05600c365000b003f602d84823mr538248wmq.3.1685572445190; Wed, 31 May 2023 15:34:05 -0700 (PDT) Received: from localhost.localdomain ([176.176.146.12]) by smtp.gmail.com with ESMTPSA id n23-20020a7bc5d7000000b003f6041f5a6csm114610wmk.12.2023.05.31.15.34.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 31 May 2023 15:34:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , Markus Armbruster , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 4/7] hw/usb/hcd-xhci: Use sysbus_init_irqs() Date: Thu, 1 Jun 2023 00:33:38 +0200 Message-Id: <20230531223341.34827-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230531223341.34827-1-philmd@linaro.org> References: <20230531223341.34827-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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=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 The SYSBUS_DEVICE_GPIO_IRQ definition should be internal to the SysBus API. Use the recently introduced sysbus_init_irqs() method to avoid using this internal definition. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/usb/hcd-xhci-sysbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c index faf57b4797..e512849b34 100644 --- a/hw/usb/hcd-xhci-sysbus.c +++ b/hw/usb/hcd-xhci-sysbus.c @@ -40,9 +40,6 @@ static void xhci_sysbus_realize(DeviceState *dev, Error **errp) if (!qdev_realize(DEVICE(&s->xhci), NULL, errp)) { return; } - s->irq = g_new0(qemu_irq, s->xhci.numintrs); - qdev_init_gpio_out_named(dev, s->irq, SYSBUS_DEVICE_GPIO_IRQ, - s->xhci.numintrs); if (s->xhci.dma_mr) { s->xhci.as = g_malloc0(sizeof(AddressSpace)); address_space_init(s->xhci.as, s->xhci.dma_mr, NULL); @@ -50,6 +47,8 @@ static void xhci_sysbus_realize(DeviceState *dev, Error **errp) s->xhci.as = &address_space_memory; } + s->irq = g_new0(qemu_irq, s->xhci.numintrs); + sysbus_init_irqs(SYS_BUS_DEVICE(dev), s->irq, s->xhci.numintrs); sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->xhci.mem); }