From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874276; cv=none; d=zohomail.com; s=zohoarc; b=E93vZr8yPA75Xhfujbx9eEA/y3nQHT04pxmz8J+KrP1o89klNP5yy2DkylCjP72Dz/F9XXeEnXgIZnC8pVLwcWs9I9V2aQ6ODPbFcnLSlTWNXj+h6SFqREc8Zyj0tPE+La3zr5D6R7xmmLjDF2ZsRs14P1jqC0TEvCIyKltBzXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874276; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1LONYHTd7jeNrmu8RfEJNRKaqa+4/OTfMiA08MmDC4w=; b=TyL6LpwZ+Ytgyw/FrGlrItfDqR5W+DmxaHZ7f7XslUYjy+LfVclXB7Lt2Ui+TuKjSxui7LY4e7uiLdjt5PES9cDzBh+lS4slrwVZPRtVBy5Ac43AUgn+Vi9DB96qr1mb4TH3/O91BP5W+53u1OJaFReFkuIFCfBN9g8psVzVEsc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593874276369725.0068195827826; Sat, 4 Jul 2020 07:51:16 -0700 (PDT) Received: from localhost ([::1]:59068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrjVb-0003VA-36 for importer@patchew.org; Sat, 04 Jul 2020 10:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrjUH-0000zx-Dc; Sat, 04 Jul 2020 10:49:53 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33682) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrjUG-0003d6-2b; Sat, 04 Jul 2020 10:49:53 -0400 Received: by mail-wr1-x442.google.com with SMTP id f18so27701619wrs.0; Sat, 04 Jul 2020 07:49:51 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1LONYHTd7jeNrmu8RfEJNRKaqa+4/OTfMiA08MmDC4w=; b=LCSMbVvH8N0ZbcZUYZvlwl0/LtuSzor2alX6qtutU+9ODMj8+C2lynOKjaqj8fXnEI Up7WQjLdb8bh14eYdbzmWq0pniHymCkqwLxs7uZhzz+SQeCK8ybk5MN0Zyhj8Eee+SQj wRrntXxiS8ThEJ3VSHHvZJ08OGnA1vj0opel3/dZthPvXbGAIhhQVqi63UTc46zKMF8g WrVDYhnL59CSHsALtHCZR8uG2+fDNJPpG55w+1h1DIiM4zmD5wiPD6EKOmnxiehzG+GO tiIAW62Y9YFjeqMNBorgEysK6Wv7zhm124e0UVH2qXSktIEDr+5rtVe5ZIRMCgW9yetf 3gAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=1LONYHTd7jeNrmu8RfEJNRKaqa+4/OTfMiA08MmDC4w=; b=WjFSHpQCbi0hgVyl2+PCPXyBespUMq6EmjfHHuxf8MOuqCV3iQcZuCIVxVPR7pTqVA KHpStFcIYuJKa1rorFP5Qrz53FHhnQ/fiVlrLdMSlU1WCpuErTtYtrsgz4XObbPhdSjR 3XrnnMLfMug1dKSvlMPDgI5/JSdSGcJbZQjHKmKJ+ulxp/Jk0+sNG8UiZH1DS4GtIO6v WHHO4rtjeAH7xP0SrmjD3eE32Y2IuDIQUyEtQDHW940/s48bdyb14TRT6O0TFKoRqGHo pMVOC1DK4D7Ixo7DBOC1c9LERFoZbBamL9yVdg6Gutfki5j59SMR9EAyEAIObFRkjEe6 0C8w== X-Gm-Message-State: AOAM530ZZh5ofHfGQP2RAkubTPEJsM8lOsUKyU0mhnSkIkcHDdYRi6eu +cX9Nt1C9L5SziVePa8mnI5PDuBnIE4= X-Google-Smtp-Source: ABdhPJyhL9pSuntp8VeiIjIT6N9OP48blUH4lL3NMOGJ+4E4luyAkGU/9nzb7bgsn2yWXLxxbe616w== X-Received: by 2002:adf:f54b:: with SMTP id j11mr41454017wrp.206.1593874189885; Sat, 04 Jul 2020 07:49:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 01/26] hw/arm/sbsa-ref: Remove unused 'hw/usb.h' header Date: Sat, 4 Jul 2020 16:49:18 +0200 Message-Id: <20200704144943.18292-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Anthony Perard , Samuel Thibault , Leif Lindholm , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This file doesn't access anything from "hw/usb.h", remove its inclusion. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/arm/sbsa-ref.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index e40c868a82..021e7c1b8b 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -38,7 +38,6 @@ #include "hw/loader.h" #include "hw/pci-host/gpex.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "hw/char/pl011.h" #include "net/net.h" =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874233; cv=none; d=zohomail.com; s=zohoarc; b=ZMzzrcRbm+HPugLcjd/tvrE+sh5i+hojNmOgSx4DlOGHLlgMlMxoi2w7oOcfOtDsdGPqGYLoTHANpqupldIjQF4/aReSI49FTKwGTDu/f198r/cl4I0MfVkCqWAWfGvFxpv/v/rvG3qfVi7BLPG2zm/YekRqByGse6P8CwFqD1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874233; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TYD3rdWUPlT0NII6NR282LsOncN84HigXsBo5vZptIs=; b=g2W5qjEKrhKuUAhrecLThCYX8MK5hLUn9hiCu6IdQkFF9uo7NHsTgeKb/tmKII+q0L/BrmGTcYj2DmdYrNFRsJFXiNeZ7LWAguXVllNwylDcI6x0MmgBpWrpgGcYVbveDaqVqYv5jaXgVYatyFnHrHL+KsQFHQhiTDNawx5HSVA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15938742333981.1687279490482751; Sat, 4 Jul 2020 07:50:33 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUO-0003FQ-78; Sat, 04 Jul 2020 14:50:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUN-0003ES-Om for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:49:59 +0000 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9dfab0c0-be05-11ea-bb8b-bc764e2007e4; Sat, 04 Jul 2020 14:49:52 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id s10so35718707wrw.12 for ; Sat, 04 Jul 2020 07:49:52 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:51 -0700 (PDT) X-Inumbo-ID: 9dfab0c0-be05-11ea-bb8b-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TYD3rdWUPlT0NII6NR282LsOncN84HigXsBo5vZptIs=; b=mOBuD8AYvWgD1eKqLpIBdjXVQ5Pph/+FmMaPRcgW2zETZQyqX8+ELNIs1My9xotg49 yl9bERPQPS4BhKGyeBRx4Qd+uQFLZYRklMZbvqAuJXZY6sEyWYouhWOjPYTFIPLsN1nA GHwtlofg4fOkSOvAn8jYj6oYYhDGjGPP34trt8rdNRv6PvCFLzPAjucb8srw71EOzwXj tqxRmbVb81GwGMeF/lodyUfzMseIwejEvsc32wNWsbTHQldJGTBhlLiCfR5UelU3S8dR pT9OEuZPV2fjo7gKaYA+MWXkGAIMr5hn5Xs7KOlPZHvMRGlwOazCfo5B65rotWknhZhj 6mPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TYD3rdWUPlT0NII6NR282LsOncN84HigXsBo5vZptIs=; b=s/IqLK0KvY7ANIUvonY6gGOR7Vs+sqy0q7dvZtPbDGkSe6NVbFPkxoEP1iLRASnPFw /+Ijt8x5FIsW3JTNyb5jXB/eDiy+mW2zXTEezWDxJ1teRCaYkcJMQCxJZHijH3d+O/Qu beQCaqTAgwTtnf2e9ErfQ4LUO9w8o/P8lGtp90CRf8GrtfqiZw95KJ07dRGaXYO5c8zK R2TJ2clIUVmWDKijKsgNpw93jgdd3IV772bFrBQVeZ3cRf74vNzUhU5i1sMh/duH9LVi Ybug2nUgxhgmZRgHQB2AlUpOj3A2yVIUborJIpW/gItH7i4Tk9je1gRVi5Yr5bRWS9Q7 Lz0A== X-Gm-Message-State: AOAM532cP+/Z1eCkSsjCo/yZuGggRxJN2Ws/kUW8eUbRMegP98EfZerW pst6yb6K7TOBS8pkK9K97KE= X-Google-Smtp-Source: ABdhPJwmYB47kPgnriIBv4UAA2pvunyU+tdfS4/5cW6u0UXI8kGWbm5Q/26nom3RMXKe12Z+5cK61g== X-Received: by 2002:adf:d0d0:: with SMTP id z16mr43245870wrh.95.1593874191948; Sat, 04 Jul 2020 07:49:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 02/26] hw/ppc/sam460ex: Add missing 'hw/pci/pci.h' header Date: Sat, 4 Jul 2020 16:49:19 +0200 Message-Id: <20200704144943.18292-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This file uses pci_create_simple() and PCI_DEVFN() which are both declared in "hw/pci/pci.h". This include is indirectly included by an USB header. As we want to reduce the USB header inclusions later, include the PCI header now, to avoid later: hw/ppc/sam460ex.c:397:5: error: implicit declaration of function =E2=80= =98pci_create_simple=E2=80=99; did you mean =E2=80=98sysbus_create_simple= =E2=80=99? [-Werror=3Dimplicit-function-declaration] 397 | pci_create_simple(pci_bus, PCI_DEVFN(6, 0), "sm501"); | ^~~~~~~~~~~~~~~~~ | sysbus_create_simple hw/ppc/sam460ex.c:397:5: error: nested extern declaration of =E2=80=98pci= _create_simple=E2=80=99 [-Werror=3Dnested-externs] hw/ppc/sam460ex.c:397:32: error: implicit declaration of function =E2=80= =98PCI_DEVFN=E2=80=99 [-Werror=3Dimplicit-function-declaration] 397 | pci_create_simple(pci_bus, PCI_DEVFN(6, 0), "sm501"); | ^~~~~~~~~ hw/ppc/sam460ex.c:397:32: error: nested extern declaration of =E2=80=98PC= I_DEVFN=E2=80=99 [-Werror=3Dnested-externs] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/ppc/sam460ex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 1a106a68de..fae970b142 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -38,6 +38,7 @@ #include "hw/usb/hcd-ehci.h" #include "hw/ppc/fdt.h" #include "hw/qdev-properties.h" +#include "hw/pci/pci.h" =20 #include =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874231; cv=none; d=zohomail.com; s=zohoarc; b=IfFa9g3yOD1EntzI/n+PfMYPVU0kDoONIV5CmXpA+3gTBt6CEKjWN3RA46lgk5hSHH5hAle5/DyyYmGmQD/c0EyfHuRJ6OIrCeOuEsa4vZduav2mfBD98bSsSwJpsJjoFGBdjjYelO0YntEKRRXIs6b/FekwkRzXSrjenyMkGdw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874231; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MuyWjc3EjPCzKMWDQ2x+ag455dTHS4+/J8s0D1IfWzs=; b=enCrZL3KqpmS96qj+rNkaDVGCflXDHLmpxDrGxhldUZ20X61lqfWbGOa8dFkWFg3sxgH2k+89Q1z3QmbSWJwpFQYpuATsNNQGcTZLsQOCVdMVAdGluWDFGHS9vqikJpcoAQ8HmDrqHKLPhFD5Z480XrFviXr+IP0eHxrSn014ns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874231055419.1690541205576; Sat, 4 Jul 2020 07:50:31 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUT-0003tj-FX; Sat, 04 Jul 2020 14:50:05 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUS-0003ES-Oq for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:04 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9f27afa2-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:49:54 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id z15so24482792wrl.8 for ; Sat, 04 Jul 2020 07:49:54 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:53 -0700 (PDT) X-Inumbo-ID: 9f27afa2-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MuyWjc3EjPCzKMWDQ2x+ag455dTHS4+/J8s0D1IfWzs=; b=eJ712M4xvrpeG0WDBqIsWoodAc0KX1IcpGrySlrkuD9AOTok/P4V/I21yqX/UEczz4 3tSXj1WMi3HUlpJkfq2a6D2xREY05qgcqqJ19Jl7cdWzw2gv+ctBk/5poKNfTIv79Q0n BAVVtuIe/u6EewOUx6SzWsbiKfIGzmfWG/Yq7yydaZQAcV3k6WTSGWLLZAqkjp55Pn7+ lBXvy8gVmzLifoWV3EcPuOxQzRn/bv2cit5TEsCXcdNiE6ar8MCWmB3dx2nr0CNajAWK hoBQwV5aFZPYADzkJ6K25xbFFvQMnugh8FXNfFas/L7BOnEBzAH5LJDg5p/AgO1233GU IUJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MuyWjc3EjPCzKMWDQ2x+ag455dTHS4+/J8s0D1IfWzs=; b=bFdZePQLKgPiOthqM0+SNRyYusNfxCytc5NmbTJNcc7oLYEmK6trHvHKqZzEMHWlCR ABaib5HMnwhox9GZKSvWyPLnHWINOtYQFWeyy1iPzSzomeWq94yFB18Wm+elHRzKRklC C3SylrbVKwDEEV4CVnWhNU3K/1SW/1DO+mmK7he6Qcffy9bGr+Nz5BKIHlNbBfK3aR5k 8iZVLStIyIPqFazsb9T5VCQZyKXBXdW2WXTvu6lAbMvYFY1oEdoQzQstQ5Clu9JnnDMO aYqLAZaWfuU+lcm/Wcxvn3sggXrLrT8uq4+GDEEzhs0/JtCptAz+woFi28/WfDu0C0Km nu7A== X-Gm-Message-State: AOAM5334ZUOgIF2P+SZRYZbeGIXqgm/a1kt+itM0yR21nm6/OzQU+7lw 45dnKrtPv96oNEL6/rUF4E8= X-Google-Smtp-Source: ABdhPJyYcaxhb0w6bZS0TVjPWW7MJK44YHjNK2tmtt5WThpkFwrsjrZmdAUU/9drVhDWFP6nr2M8dQ== X-Received: by 2002:adf:e9c4:: with SMTP id l4mr42871069wrn.9.1593874193982; Sat, 04 Jul 2020 07:49:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 03/26] hw/usb: Remove unused VM_USB_HUB_SIZE definition Date: Sat, 4 Jul 2020 16:49:20 +0200 Message-Id: <20200704144943.18292-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Commit a5d2f7273c ("qdev/usb: make qemu aware of usb busses") removed the last use of VM_USB_HUB_SIZE, 11 years ago. Time to drop it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- include/hw/usb.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index e29a37635b..4f04a1a879 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -470,10 +470,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USB= Packet *p); void hmp_info_usbhost(Monitor *mon, const QDict *qdict); bool usb_host_dev_is_scsi_storage(USBDevice *usbdev); =20 -/* usb ports of the VM */ - -#define VM_USB_HUB_SIZE 8 - /* usb-bus.c */ =20 #define TYPE_USB_BUS "usb-bus" --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874232; cv=none; d=zohomail.com; s=zohoarc; b=C+ckdko1NP+N49IQ1Tav0EW/QnP0irzQqAfe4oxmXCr8iQfBj4UdT9dOsztDZTRFqan0tz21ZGLJ3x3cqZzIZ/dxxONoJPWoEhYj/OCeOEROMvHeQXbGOHCAaSJjipNsPdsVG18hmKFn1+3z4QP0gdugBWaZf+ZSLvxvy9Kley8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874232; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Oswm/m1DAWqBYNXr2uTrm9A1MHSMTs1YgVZvoQJC8bI=; b=X3YCtHTGlaJc9628mgZPABb8pABxAXeEX0UZgm/Mysu/T9B5bruoB4A6L4J09yQj83F1hSIOFzxt/DhDkJcW9ZS6I7if1NW2gsLXP1jCMYYyMqnOeocOQxVU5uHJrdVwn9PXzP5G/iyD/yJxkwSvQqX9rA8hlR4Std/dAHNru5k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874232374563.9911246286106; Sat, 4 Jul 2020 07:50:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUY-0003w0-O0; Sat, 04 Jul 2020 14:50:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUX-0003ES-P6 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:09 +0000 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a0583856-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:49:56 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id q5so35745347wru.6 for ; Sat, 04 Jul 2020 07:49:56 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:55 -0700 (PDT) X-Inumbo-ID: a0583856-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oswm/m1DAWqBYNXr2uTrm9A1MHSMTs1YgVZvoQJC8bI=; b=gQJg1+Wh58x4r1H2OG452+zx84IaV+E1T+M1C2BaKGGeGjGLijbGT/5fa47rZbH8+0 wx3oFF6OQ4YShJqliLGLwkPIB5oJdoms+e1FUh9KOzyP0OaQJPWoQRUIivVmvk/OIni+ pIzj1GiWmXLxj18zi7ZWsi1d3bC0/vHZhYuKuqhtZGYCTA6vwHL3QyRfwCu4wrFZiM4w nFj0qm+tx7V6fzx/zRQcGItYIzadZOv9ExIOm820D40RuWqtW4US5zoVgHElBrDFWXJU AbeBG/uIbXymxcCdns7Thwq8fUZU4bxlC2yWqkCy++/qfZTE6Jfr1HmDinGWpjPF9fWy Rs2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Oswm/m1DAWqBYNXr2uTrm9A1MHSMTs1YgVZvoQJC8bI=; b=aGJnS5c6zOcu5hbRbQWdzrVZ8XL7rqvgyex1qGcPxeCaXhlBt/ISVyV0o+WEMcPO5z oWgScbSk6WOw+98tLtCCIIF4e4sq+mwdMOOs7z5xmGIA1tTxQZ22K/VQDLSXbiIbv7+p x5cxs2SGN+eLllA0rxQmJR/T+Qy/0dSDBFdVYk/whO+KYkjVaN0VLQRVO1U6YrM5QDER BHUdJmF5H7hGbSfL3u1OXt14vJO1kt1KJQofRCfGFeGeWMUTEGHqZcxZZokW0Cv35/U1 ficfSzBy2zb3aYHCKFHFgrqVTG+jOw94oJe8gdVYlVZtXLCvG4kMxPCZttWfesGDcSRY fwog== X-Gm-Message-State: AOAM533C/b666Oo3B2eG9Uhc/YbapWM4MH/7y3LYlC7lvRl9KIrHlvV6 Q836nAAlyWHN/4wTGamz7ks= X-Google-Smtp-Source: ABdhPJwNyiTXMTeB3cC7VryyLyGzYsyh9YLCpLFWWlt+IfdrZqIJno2o/CWRvBISeVrXF/zuyPa+Cw== X-Received: by 2002:adf:9561:: with SMTP id 88mr11042389wrs.240.1593874195987; Sat, 04 Jul 2020 07:49:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 04/26] hw/usb: Reduce 'exec/memory.h' inclusion Date: Sat, 4 Jul 2020 16:49:21 +0200 Message-Id: <20200704144943.18292-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) "exec/memory.h" is only required by "hw/usb/hcd-musb.h". Include it there directly. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- include/hw/usb.h | 1 - include/hw/usb/hcd-musb.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 4f04a1a879..15b2ef300a 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -25,7 +25,6 @@ * THE SOFTWARE. */ =20 -#include "exec/memory.h" #include "hw/qdev-core.h" #include "qemu/iov.h" #include "qemu/queue.h" diff --git a/include/hw/usb/hcd-musb.h b/include/hw/usb/hcd-musb.h index c874b9f292..ec3ee5c4b0 100644 --- a/include/hw/usb/hcd-musb.h +++ b/include/hw/usb/hcd-musb.h @@ -13,6 +13,8 @@ #ifndef HW_USB_MUSB_H #define HW_USB_MUSB_H =20 +#include "exec/memory.h" + enum musb_irq_source_e { musb_irq_suspend =3D 0, musb_irq_resume, --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874234; cv=none; d=zohomail.com; s=zohoarc; b=GkrkFd0zGpQX9wUuju9s+O8ykmW1bkCryVk6xw5uqEdQxa0MP5b3OVbSI34N3okRpWnUjCXfHzXE1UEtzRvq6tjBmlhY47ApvpKTCiWydZes+rmYsxQs8VBdHe608f9RXPqoEZ8i4BF76PlAUR236K3zB72tRb4QJkM/GZO4WtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874234; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7pFkSbRRQbCuRBQa/wHlCeQOONUZFK/RPfYxuVN6mNY=; b=UV4d0zoxyi6CK0J5U3xfQcoZp4vgosZi0p9liMUhLeL4OLsPaCtFOHzl2x/uv5s7NE5IWfSexnQYwWUXCqisw2s5q39Go47CJ7ge0g4rqYpu5HeFrINwBm2yDyIFGwy3EQVuw7ZhjYyIcaRiUdUQgKpG+IImYxnjt8bfWM3xf5Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874234092480.8853962484985; Sat, 4 Jul 2020 07:50:34 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUe-0003xr-1K; Sat, 04 Jul 2020 14:50:16 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUc-0003ES-PD for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:14 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a1811856-be05-11ea-8496-bc764e2007e4; Sat, 04 Jul 2020 14:49:58 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id f2so7792457wrp.7 for ; Sat, 04 Jul 2020 07:49:58 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:57 -0700 (PDT) X-Inumbo-ID: a1811856-be05-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7pFkSbRRQbCuRBQa/wHlCeQOONUZFK/RPfYxuVN6mNY=; b=oe96UZf2PvTeWCGOzNPdJjjjwq8e7uWWti9W08FMinN7P58qMXJzwG4jf7BQqAlIXy 6nHLswC2ubCB3a5BJuyeZJgNcIKrAIDo4ARzHOGDOs8dG3JjWPLZh+xe/GSdKhL1zZpq 8BYgKvBkBIAl/g+8RWgLQjeAv3/zhyETI0aJxVBr/gw0rUcBfnedTHwEViIUPNIXNva6 03JOGnSszEoF4cvdF3lLiUVfjtrvuQh3LEc873Fecq0vjBpXttzot5/ZB9ZEJEQG430J 9YLB5PV5soEOhpr3WG8RhSY1eKgOIEVX6mRUL3RwbaUehHrdq/CwhlxSp1fhDKJcCsc/ pq5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7pFkSbRRQbCuRBQa/wHlCeQOONUZFK/RPfYxuVN6mNY=; b=G3iciyn7RQ8poATp+XoZi/LGasfXagXvrMp83LJoggQKPv5/2nWah3EsboJqty8Ey3 Llbi9QyB3V9/Xuv+OXgLDbtpwJ9OAYFi2nUercF+38gEo8qLrcypuano9wCpcQw6ZskX TtB+YE6oGcNNzrZ7XnAOobI5XMxnbMB3XQDgoQWRyv6ic4qP6vPrx9HTHPgpsHOcNmgu OCJvopcsNv1Kst/fPpWPdIOrOjNE0NJVXKVakIA88yV8KuWjjpksJdg7ocvvMhJRAPJe JEYLUWoxeoXM7/ZFyAkaq7sM1tjQIkRgtVMrqEWN5zJa04rq4deZ3l8fnhibqQq8uFxi rRTA== X-Gm-Message-State: AOAM5317t1vYaqpZiEKllene4TYWqqc/7jTOab5nUgYtIKfizhIEb/+c WLs0NuYB9RkclxvMy8nwYZ0= X-Google-Smtp-Source: ABdhPJyIsvEkdmFv/CEzZPKYJCez2abF31l4aHFgnR6C3Ee2RRBQ8QQm9RtLdC3SuJbJy3WxELYEqQ== X-Received: by 2002:adf:f08b:: with SMTP id n11mr40029476wro.312.1593874197889; Sat, 04 Jul 2020 07:49:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 05/26] hw/usb/desc: Add missing header Date: Sat, 4 Jul 2020 16:49:22 +0200 Message-Id: <20200704144943.18292-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This header uses the USBPacket and USBDevice types which are forward declared in "hw/usb.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/desc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/desc.h b/hw/usb/desc.h index 4d81c68e0e..92594fbe29 100644 --- a/hw/usb/desc.h +++ b/hw/usb/desc.h @@ -2,6 +2,7 @@ #define QEMU_HW_USB_DESC_H =20 #include +#include "hw/usb.h" =20 /* binary representation */ typedef struct USBDescriptor { --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874244; cv=none; d=zohomail.com; s=zohoarc; b=eFISIMxMiB2mtZdKCntnIJFR2PDgeJ/9ARIogqVe0isocDkTXs600bIV+pbvOo0KUKiVGM39+7/d/CTum3LZ90DzVhjtzXMnuIdMLrUeTT4k/WbDtVvPGpQYjycbLWuzxivosa7KlzsErzxVxBJfgA1HPBUek84QwtDjNRbE2p0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874244; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ci3lKGhT7CaGmfO0merQ+/KTVofaj9NyV7u1/2UAP3w=; b=ej2NzDAxpQpv2a/b6H/U03ufaSMl72SoOnKxlR9XXB1zo92KQ+2HCYpVQxQciiWI36mWNnSr8MxZvwQIfdqk40c5Hd4x9BNRlvoOhKOSY99el+4pUH6kJ9+vU91GUSeraPlhMpYlP/yLrnD1/6qYUld8SI1axOm1pMjs+vvfJoE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874244424568.1286386685341; Sat, 4 Jul 2020 07:50:44 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUi-000408-FS; Sat, 04 Jul 2020 14:50:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUh-0003ES-PK for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:19 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a2b47b14-be05-11ea-bb8b-bc764e2007e4; Sat, 04 Jul 2020 14:50:00 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id g10so12677223wmc.1 for ; Sat, 04 Jul 2020 07:50:00 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:49:59 -0700 (PDT) X-Inumbo-ID: a2b47b14-be05-11ea-bb8b-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ci3lKGhT7CaGmfO0merQ+/KTVofaj9NyV7u1/2UAP3w=; b=HTr3GqMeiMrHSFVz09gNzzyGE5/NusjcYwPUPJ9+Az6tEcg4A2YjJthJc8BKS0f3xF F4+ebiouyz8NRclvNRqup/GDrEN4F9p2jviH4u+BYG+0fxPmcN8XcbhSAoh6SFqU4Zw0 FH/IpcWFj2yRtZ9xJLuf96x1ST8pDEf9hbCzZCPwmk0sO+6vtZTFj/sU4oryrL3pJ5Li Z1W2ONSpiFn0BO3jkg80P04ozix3y5MCMrcei0bm8NOU72QICc6nO3mwQ0RF77ptyVlN TnLG2rz47FkHMnveffGYGtgCStlP8At2zi6ngwyWWC2wn+upypNWXZkbAwAcNzprcGts BnOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ci3lKGhT7CaGmfO0merQ+/KTVofaj9NyV7u1/2UAP3w=; b=FH6YksVs3O4etbI8wdq8gEuWnxDOQ/P90Pii+Ro7zYi8TLhmAH66yfx1oNDdvuLXd9 z3bg86sTl+VEIIS+BTFeZT1OyCbeohdS0Em8WDbkODDWmLJ6SG6Ffrl46/oVQTyQlzCp fLMKTK8eqX/Qwjl1DLKcEL2TlQi9LMlcx5tz31IY24DfSQ2hNlUsL9OUFLfE9tpFkjx7 2BSoJGFqsVdX50ppiiaNUhW5xg6MJfvo+OFvrWFnun6YXnlnov2CdS9UNEkeaWbri/yE McZFyBRhXlcRVB1EO/a7/V/OMdpIhh5M2pHVVAPY6Ux9FYFii0LqBj1sc3GLCJwzpRR1 yKEg== X-Gm-Message-State: AOAM533ev3KBkowerYAlNWi8Qf7x3iApbUxkVyc12H8CXHubc9ZV0tpv O+sRgNi5mmr8hm32wvkSvmA= X-Google-Smtp-Source: ABdhPJxDJ13C73XgkZIyjGV7LxF7eBLsgTcF0RFnIfpAnAwchRq5JuWHl5cvDUWZqd//9F+vT3r0og== X-Received: by 2002:a1c:b386:: with SMTP id c128mr43397378wmf.133.1593874199940; Sat, 04 Jul 2020 07:49:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 06/26] hw/usb/hcd-dwc2: Remove unnecessary includes Date: Sat, 4 Jul 2020 16:49:23 +0200 Message-Id: <20200704144943.18292-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) "qemu/error-report.h" and "qemu/main-loop.h" are not used. Remove them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Paul Zimmerman --- hw/usb/hcd-dwc2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 72cbd051f3..590e75b455 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -39,8 +39,6 @@ #include "migration/vmstate.h" #include "trace.h" #include "qemu/log.h" -#include "qemu/error-report.h" -#include "qemu/main-loop.h" #include "hw/qdev-properties.h" =20 #define USB_HZ_FS 12000000 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874246; cv=none; d=zohomail.com; s=zohoarc; b=MWeUoiOvwhWVK9G8LB1QH8E6TUWmh8o0ei1hkh4x9BHYavWuDBw7i/ojbEUFGZWZ8kPBYJXA3C2l/hoUkYUQzOCmfkeuQcTbC2tEnNTjFDseSgyefg4MIWTc/0R0JPpc12dFaIBTWsjRX/qX+5jN9zLP3X7wlD+eV4qeGfcUukE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874246; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/SEb7i40/nbfV3CvB7T6xkytpAoG+YE52veZZ5mv5j4=; b=iDVG9dV0wg4lUJfw6T7Hy/a1pSkOR5tEFXa0N69RV3K7t58JfxdStqRww3pBvNqI69VURBITZbfrxaBWY6Ji7M+ZaRDyrU7Brp3LAkLapOAJAxCbC+5v3C9Cv+I1q7wkTbnebNcYzaqNbZ8RryRoG7t5lt25s0L6sXzEOyOefSM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874246390597.0986950711504; Sat, 4 Jul 2020 07:50:46 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUn-00042Z-PR; Sat, 04 Jul 2020 14:50:25 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUm-0003ES-PI for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:24 +0000 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a3f9bdae-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:02 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id z2so13504664wrp.2 for ; Sat, 04 Jul 2020 07:50:02 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:01 -0700 (PDT) X-Inumbo-ID: a3f9bdae-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/SEb7i40/nbfV3CvB7T6xkytpAoG+YE52veZZ5mv5j4=; b=M86GQvVjqh2GOpnc8959nIEqLnIltzOWwA63YgcRTjTllNzsFeKa2AxLUplFe59nVZ EU5gEhxt62SSXh8q7000ETaWmRIbSKTzrgZ47MtBnXMnZm75mqtFngMn13ekv5iU3uR1 jZH+QjvY71cexOwBR/zzvmBgICLG+ZXIDZGxG3evDVbBXwFvFbeNbh4ioXGgUGUaFauF lbh9Jk61RelYOfy760OtZib/qtDn/T5+sGmZ3flNc8ml4r0kTxIqEmHI5Z71CCawDYVS JHWip9FEybZwE41MmK/BYGDg85WJYNaGdThCFnN87eeYykN1tf2mZJKQABQuft2b5FSo Wb9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/SEb7i40/nbfV3CvB7T6xkytpAoG+YE52veZZ5mv5j4=; b=bCE1XVYMh3IC8dFrgKf3Cj4UFCjctmDCQDfJOOItTltY0F14a3+Y8CK9FrrAhjAnaB 9mJg2Z5ps8fNgYhDySiSB4OfOZjG5zr46zHP7TMC4Mp9vImUlBf4up/CWYKx4swvOIFA tuDL5OP7AA9y//uVI0qcV7+e65+woOkYhuPdMbBF3MDSL6f/qDOYuolrc5PzNeTOCtZX YGWxWauX30VhBFf0qr4FB1c1vZJ8SX/GY/JwCRiFFchv3dZ9LwQmroFP/QPFtfMnZZ21 qxi5ZRrkQHpep9sWKw6YAcpd2sB/G5NLu7IwcwabnL0TbDqGx5T3BUMFsImJbxAufrS6 g7yQ== X-Gm-Message-State: AOAM5333hzYQfqTsKlu9JSlSrja7buGoXQhZYT5Lh/Z0lkVrT9CGIbZ5 rTa5x8kQ9vY5b4Z4pVMfR2Q= X-Google-Smtp-Source: ABdhPJzU2sv77zfdcGa3LX0JoxfFviQ6DXsIevpTW1tzmmUhaY0yZ73I5eZpKHBXzbQobqiSJf7dUQ== X-Received: by 2002:adf:8b50:: with SMTP id v16mr43284603wra.188.1593874202076; Sat, 04 Jul 2020 07:50:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 07/26] hw/usb/hcd-dwc2: Restrict some headers to source Date: Sat, 4 Jul 2020 16:49:24 +0200 Message-Id: <20200704144943.18292-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The header "usb/hcd-dwc2.h" doesn't need to include "qemu/timer.h", "sysemu/dma.h", "hw/irq.h" (the types required are forward declared). Include them in the source file which is the only one requiring the function declarations. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Paul Zimmerman --- hw/usb/hcd-dwc2.h | 3 --- hw/usb/hcd-dwc2.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-dwc2.h b/hw/usb/hcd-dwc2.h index 4ba809a07b..2adf0f53c7 100644 --- a/hw/usb/hcd-dwc2.h +++ b/hw/usb/hcd-dwc2.h @@ -19,11 +19,8 @@ #ifndef HW_USB_DWC2_H #define HW_USB_DWC2_H =20 -#include "qemu/timer.h" -#include "hw/irq.h" #include "hw/sysbus.h" #include "hw/usb.h" -#include "sysemu/dma.h" =20 #define DWC2_MMIO_SIZE 0x11000 =20 diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 590e75b455..ccf05d0823 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -36,8 +36,11 @@ #include "qapi/error.h" #include "hw/usb/dwc2-regs.h" #include "hw/usb/hcd-dwc2.h" +#include "hw/irq.h" +#include "sysemu/dma.h" #include "migration/vmstate.h" #include "trace.h" +#include "qemu/timer.h" #include "qemu/log.h" #include "hw/qdev-properties.h" =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874249; cv=none; d=zohomail.com; s=zohoarc; b=hryCWsyKr+0Kc/rjK3cCYhIaFXi0Cmi+DUMEil5R4NuCZ0tMe0Wpf98Z2zcyhYS3wqa7h+7/PyaDlgOH6HjAh2JWxgrHAyeXCS7d5sBpacfaTHoBUxoBT66MW2YOJdhtSjV2Iecqcx9AkyJWnNyYzcnC8hJd477N6Iib3BEbtfU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874249; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8KnwDCFnDP2p4VznLGchEQ7MhbCDHoouF9hb3OmMvFo=; b=L+2+peDSne6/00ZEPnfRKB7WU24Nc+o572fzBdiOCcvN79vJVOzard9A8NmuFoEt/E9RfyOxDtX8+BQya10xhP8vW1kGSmQb/JipLnu6yCRJuNludvSMcCZIcOUae4h57FanYH8Fw1srBAEPLETAuxwy4OxEI7pfgOFUGjdNm1g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874249102477.94180863689553; Sat, 4 Jul 2020 07:50:49 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUt-00045P-2t; Sat, 04 Jul 2020 14:50:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUr-0003ES-Pd for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:29 +0000 Received: from mail-wr1-x444.google.com (unknown [2a00:1450:4864:20::444]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a52e31be-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:04 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id z15so24483030wrl.8 for ; Sat, 04 Jul 2020 07:50:04 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:03 -0700 (PDT) X-Inumbo-ID: a52e31be-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8KnwDCFnDP2p4VznLGchEQ7MhbCDHoouF9hb3OmMvFo=; b=qnXK+ln5rQy/kZGC3Fh2RFx/8LLRy2FzRaODh+swFw0DtexOC034PCwojAmD2p2qEc +xBeYKP6Sea6ucH8fkvrVNNAXzAZNbHz5N4CojECMrqUJVqYMYiMaro3hTSh93ifaaQa XZwymWtZAF5r5fjYDxoQfxgBDwsrJ+DJMbXURYjcQX+7tdru4xwSDdEYfIB4ftoZAWW3 odapVHwJEugfsQL3deagFHvaMemeZ1/ffZNaL8ml9YhUlAPZWcmqAc9Ldb9FPwIY49F5 nCg4ELh3hzoGogZjdC9IsUHrjWxHgtGLNK9IssYFB3ec8/8vdv8bxlDIDWrs/Yk59fX7 Perw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8KnwDCFnDP2p4VznLGchEQ7MhbCDHoouF9hb3OmMvFo=; b=Xc/87NXteoX8tE+sTZK7x9T9bgVBFJUbD81cRZ8Rd7hXP17kJXIlcna6HY0OPqx6CX 7eOZAzi6O1YybqC39JQuf+LUWWetbc+DqPfc9pl9G2nOTnfwmM0aO2BJ5ylZOKUqqe74 MwwWElhMghcMCfiKAyEo6dfu2AEqQT2uwZk2KFDNpj0dc1JaXq8zBhHkZdKPjvGM2nJ8 l4DraPTmm53Y6cagBbkJL0BMJwEaO9F8avrnx1Lstbr28zkhQRSo2+VovZhFUBto8Xli JWVKl6Sd8Xngnwz+jgAG11aqyQB+ifayMgF8pY5R4qmK/nRpBv6jEd2CK0V+798HyKLD 9ogA== X-Gm-Message-State: AOAM53250OkZhW0WUA4vwMqxG+14/Tgv2pE9SeeQnu2LtBFruf/l+nKV ZRnjqJt/KCSdvFBBcQWtD+Q= X-Google-Smtp-Source: ABdhPJy5uEuHNE6Qu6FF+bwIyX64Em7+RTT3tgkuG40gaTm44oygCnXfGMDpLMWbQQ/T4oOMWH2j6A== X-Received: by 2002:a5d:5381:: with SMTP id d1mr41607272wrv.177.1593874204051; Sat, 04 Jul 2020 07:50:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 08/26] hw/usb/hcd-dwc2: Restrict 'dwc2-regs.h' scope Date: Sat, 4 Jul 2020 16:49:25 +0200 Message-Id: <20200704144943.18292-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We only use these register definitions in files under the hw/usb/ directory. Keep that header local by moving it there. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Paul Zimmerman --- {include/hw =3D> hw}/usb/dwc2-regs.h | 0 hw/usb/hcd-dwc2.c | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {include/hw =3D> hw}/usb/dwc2-regs.h (100%) diff --git a/include/hw/usb/dwc2-regs.h b/hw/usb/dwc2-regs.h similarity index 100% rename from include/hw/usb/dwc2-regs.h rename to hw/usb/dwc2-regs.h diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index ccf05d0823..252b60ef65 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -34,7 +34,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "hw/usb/dwc2-regs.h" #include "hw/usb/hcd-dwc2.h" #include "hw/irq.h" #include "sysemu/dma.h" @@ -43,6 +42,7 @@ #include "qemu/timer.h" #include "qemu/log.h" #include "hw/qdev-properties.h" +#include "dwc2-regs.h" =20 #define USB_HZ_FS 12000000 #define USB_HZ_HS 96000000 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874251; cv=none; d=zohomail.com; s=zohoarc; b=hZ10RV9LzRgJEhlz3BrQgN6r8pWqPRazLSrfn73Ap95/0xZH6wLwMHE4NVDHDA8a4ucEx569DVo3hBJSACI8Ractt061CFOfqzrBtRQjO3EeR7ihAzcVPPH9ewQAb6odk9rrGMfPo5bFwZmxdqOTtCGlDYaIF+sHnAm5q+AcF/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874251; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6Mlo0AeYRU65Ls2fCVkmevBd3nH8ZXr33Z7OmOj+vXU=; b=VJ1TmjyxFgS9m63pCX3NXlcj6JNTW6xjlbt73DyvL99ikAF5PX+vwzhuY5DKqk+1Bg1OoxJDn5ZlIK3uL/Sj7MyCc4XcbZSrj0UmbpvyIM9ee/HW51AM4fT0A5ZwcpM34wAUNQUW9vlWazncIJktEAZWUyZvgUz1y3FTaE4PYAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874251761110.94036739338048; Sat, 4 Jul 2020 07:50:51 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUy-00048H-D1; Sat, 04 Jul 2020 14:50:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjUw-0003ES-Pr for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:34 +0000 Received: from mail-wr1-x433.google.com (unknown [2a00:1450:4864:20::433]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a6634f6a-be05-11ea-bb8b-bc764e2007e4; Sat, 04 Jul 2020 14:50:06 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id f18so27702015wrs.0 for ; Sat, 04 Jul 2020 07:50:06 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:05 -0700 (PDT) X-Inumbo-ID: a6634f6a-be05-11ea-bb8b-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Mlo0AeYRU65Ls2fCVkmevBd3nH8ZXr33Z7OmOj+vXU=; b=gODFZA0NwiEg34xoLUZooBEFePqRiHvzOgk7GoIz2n1rFGd4QSl0yPFHs0kMpTwfun VxbOHiWGiK7hGkJcR55uhGHJOkSnTOylYJNNNeJNFX5MQ1AJWFLxthC0JxYRXwwA8UD6 0T4W6OXB8JWENKKs9BjOmQtMx26PqxWLkNEqphVLzbN6BpKPqkGpMh3IysQmS3XaqFCH w/AkpcTcynoV0yqxNIqLzGxVmIkT1wEWEZ/2m+7m7ZFEkqqyiCInBV+iToCedjNeVAij I8W2Zmy8BwxXfoflWqBcUrD9nDoivwv8OJoVTnLun2Tiql7zQaqUo+6b6+3cW7+Kchj4 DYZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6Mlo0AeYRU65Ls2fCVkmevBd3nH8ZXr33Z7OmOj+vXU=; b=pMmpzGN3Jn9yhmi/+4hWkDRbZSGJbXLJdy9AA1ygmj44la6DrbZLsx3+nPqHQfo1qk sdwTt1iiHw0DNxnlVP8fc6MfihBShS/xKrD0rw4bHGrhKuTc0dgNY4N1Ed0RBeD4ua/i 7Qt1sITlAlSlZIS63/PfouCelOo9AeFK5kNOyI3cIiXwxUVC+m1fb5pqbgRI0hFgr+Io S85tYEIYMGO9n9cZA8T5oKH9FfWYD7zLOG671ywULlx8B81WP6uPrUnywwVMqZrJSWAh w6u54D9bBtacB6MPb/cl7HZdx15GSPECMENA+e3XMFFdTFRrLw6yfZLnX+0QV0yL8yes xRwg== X-Gm-Message-State: AOAM531CnM3aEYxrYy+v0HIW+K42E9Si9cdTSE0VO6tsYzraPOkGjV3K pg/DoljnFlHJyrCuwZNHjqA= X-Google-Smtp-Source: ABdhPJx90xoS99/KVAVNosR0acMctdxAlHMTJW7Yd8LCiWu1nVe8JG8D7h3cg324kUXYXFvYsOB19w== X-Received: by 2002:adf:f504:: with SMTP id q4mr40505370wro.163.1593874206130; Sat, 04 Jul 2020 07:50:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 09/26] hw/usb/hcd-ehci: Remove unnecessary include Date: Sat, 4 Jul 2020 16:49:26 +0200 Message-Id: <20200704144943.18292-10-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As "qemu/main-loop.h" is not used, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/hcd-ehci.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1495e8f7fa..256fb91e0c 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -34,7 +34,6 @@ #include "migration/vmstate.h" #include "trace.h" #include "qemu/error-report.h" -#include "qemu/main-loop.h" #include "sysemu/runstate.h" =20 #define FRAME_TIMER_FREQ 1000 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593874429; cv=none; d=zohomail.com; s=zohoarc; b=S/kcyAVii0MMvmJC6XKgo4nZJJ9As4x+V9mxpPogO1jTqoehG1ASE7N2RgYHj9GDbt8tktrjueyh0JHaeGs+ABBAG0m8+X8KPic1bqtAdnrPKc0LA4PyfjQGhAj3fGPl7m6I6xovmfCxc7IJQI6sZ4WXNCecMV6ntsrqzqeGuDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874429; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CVXjF5m55kSlusAor5YG6lDc3XbyrrRebQzgpXEfhAM=; b=C8edLPz567aVE42YFHPWR3D6Yopm4tu5VeRp6L4+283noXDhS4+cpT0M/vDo0SeP7L8MYKMf6RJLkHXextDj9BscvQTRwgy9loU1FoY3ejlY+h2AwxYDCxuV0vvtYz5nGeBKVDbVHTMwzYs6juQiFIgZeEpS41ALNJbPLp63CSE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593874429286657.4775468014117; Sat, 4 Jul 2020 07:53:49 -0700 (PDT) Received: from localhost ([::1]:43750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrjY4-0000B4-26 for importer@patchew.org; Sat, 04 Jul 2020 10:53:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrjUZ-0001ik-P4; Sat, 04 Jul 2020 10:50:11 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:39250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrjUY-0003fr-8v; Sat, 04 Jul 2020 10:50:11 -0400 Received: by mail-wm1-x32c.google.com with SMTP id w3so24606689wmi.4; Sat, 04 Jul 2020 07:50:09 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CVXjF5m55kSlusAor5YG6lDc3XbyrrRebQzgpXEfhAM=; b=AP5+c+c62PoQXfTA/LtPm4Xh/2BhHY+f3Lrq+ywLKxnRs/teD8SlK4rBeR1W21QVVg MX5/zdYcr6MAV0tTj6y2JwWtreM0kI/3HLVXeM5Km0zk4LkxkDr+JUBRTgKPd4JDTNTQ qN+mtEml6SPGpVvDH0gvcL2DaAmIUkHFVWrvjkbOj7nMpqfWvSbHnLG867tnERkfPaEt R2NVOPlavAmVmA4nXJZ+9rKOMoryjsy3gDMvjOfRq/6T+kmZOAFOqpsdRHndZbJgqOt0 X2QNL+czgbdip7AR/uSYj4AY75akrcM9UFux62yHvkIZB1h62OgvTkd3vwzX7RVlkGWT qEKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CVXjF5m55kSlusAor5YG6lDc3XbyrrRebQzgpXEfhAM=; b=Rno1h0TOP40mC78G8rx7YznS4QFn1Yom1ptwWdKDmGONV6R4WXFkqErwvI0UA8cfTG o6yv7jOfQkybIjyxXWKAypRQIrPknNdgztSQxwb5H5i1mHC+zj3mjxHIseEAvK+M+P7l 0glXu5E2qEehOevOKmMfWT9p0IeWj7ew8mCg4Zb/9Iw5W98H6Il+XffEue1dqOu+8rPX QIWPMwlBQjaHBU4GuGcnKGya+u87wrIso6TmFL9JmbCIuBXPxHJSPCknoL6Sw6L53w3u HQ/iZSnP64LtKWBDli40xNYvgbpchgbyN/TpV4ax7mbiUYmtk76FWfKs0x1SqH2u8RXg qd/A== X-Gm-Message-State: AOAM533My5frZyNAu7Zc6o+JGOjd6VPd7BHMmzXupdPtz7PU+OVzfvmi ha1npqdSBR/8G6lE6evtjSSDcCL5kg4= X-Google-Smtp-Source: ABdhPJymro0ZDYhdB5ObnYkjPPmmHwp/a0dtBWYIDo1/eOyMgDUzyUYBTppKmDKb9G4hobFLnzrm0w== X-Received: by 2002:a1c:18e:: with SMTP id 136mr10977102wmb.93.1593874208054; Sat, 04 Jul 2020 07:50:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 10/26] hw/usb/hcd-ehci: Move few definitions from header to source Date: Sat, 4 Jul 2020 16:49:27 +0200 Message-Id: <20200704144943.18292-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Anthony Perard , Samuel Thibault , Leif Lindholm , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Move definitions only useful for hcd-ehci.c to this source file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/hcd-ehci.h | 11 ----------- hw/usb/hcd-ehci.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 57b38cfc05..4577f5e31d 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -24,17 +24,6 @@ #include "hw/pci/pci.h" #include "hw/sysbus.h" =20 -#ifndef EHCI_DEBUG -#define EHCI_DEBUG 0 -#endif - -#if EHCI_DEBUG -#define DPRINTF printf -#else -#define DPRINTF(...) -#endif - -#define MMIO_SIZE 0x1000 #define CAPA_SIZE 0x10 =20 #define NB_PORTS 6 /* Max. Number of downstream ports */ diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 256fb91e0c..a0beee527c 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -36,6 +36,18 @@ #include "qemu/error-report.h" #include "sysemu/runstate.h" =20 +#ifndef EHCI_DEBUG +#define EHCI_DEBUG 0 +#endif + +#if EHCI_DEBUG +#define DPRINTF printf +#else +#define DPRINTF(...) +#endif + +#define MMIO_SIZE 0x1000 + #define FRAME_TIMER_FREQ 1000 #define FRAME_TIMER_NS (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ) #define UFRAME_TIMER_NS (FRAME_TIMER_NS / 8) --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1593874542; cv=none; d=zohomail.com; s=zohoarc; b=g/OW5uA9DnP6b4s/TjNd1TkIFjegmCXlZc4WYtaeQVkKuXA+Wo60C5z6DQOH77Ej31K8dToRqrPzuEdNZBNBy7pLSSYw0fg5s9xbY51UxZEvv2kR01hoMlXP2U/9dAS2YKh4tDTKSILUTZnMwQksZWoN5O2HKUAyFTugfrAHTeQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874542; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Qlr3O8z8K3sxKCQEA3LIB47YWANsKrmr6NiJfPzW+pA=; b=GmCAwMHtChBoypAqlKdeTal1rP/D10DMTC604t5pyvM1lprXktOAUXw5jcOMzWNtuP4vDTiEj5P0tZMSv0KpTG14OWLlxYL+xij9st5t1mzVBNLIJ76SkEg6ApP1K+gooLdic7+ohA+N2ymEOp6I2IyDdE2PCAwkGmL0YDoCD2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1593874542569531.8664102211856; Sat, 4 Jul 2020 07:55:42 -0700 (PDT) Received: from localhost ([::1]:52524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrjZt-0003iO-1p for importer@patchew.org; Sat, 04 Jul 2020 10:55:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrjUb-0001nE-HG; Sat, 04 Jul 2020 10:50:13 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrjUa-0003g7-0s; Sat, 04 Jul 2020 10:50:13 -0400 Received: by mail-wm1-x342.google.com with SMTP id f18so37074163wml.3; Sat, 04 Jul 2020 07:50:10 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qlr3O8z8K3sxKCQEA3LIB47YWANsKrmr6NiJfPzW+pA=; b=BjegYO4FHLxpds48YkBBFzRrjEv1/GP+e4ATsl6+otTSGUY/901sR8dfeFezH6YE/H gyqcHtJDTSjMR3xSfApYj8hqtz/wSqo+AhH4cF/fm2j+9m/n0GaYISJPWJ/RwXFwMv0i zF35Mon1ROOvzuyLQlhn2ubfKHpMR6u+d6BRgIWzYqjNEGrlhI70Re1P2IMAC6x/WVCy UpAhaCc/lRUYHliXs64Cz+eMjpdgUsURvkEK6XHbHXGDgqkC12TEmbUML5S9HZLBsrDI CfvgBiMtwGNU5/W+nM99z3Uhdqnhwsjs6JgDwP2puNTcMnyTpTn0mUq5lKsTdp+nUtSr CzWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Qlr3O8z8K3sxKCQEA3LIB47YWANsKrmr6NiJfPzW+pA=; b=cFOZs2K1Mc9DbIU7YJfGHI7UKLFiSGqcAlNYLRNbdrsEG66zymXL3nc4TbtmSQhTvb nUMGKBekZiPFpq5ICMZ5R0vBo3SrL6M7wiCvuf06v3qR1eJHcLH++mH+k6smwBT2rLSr vwM3dka4L16GOvgnuuZDnioPR6OmIqpQsOx0JkbNDR6L+PipJnymy8YEZFxo9yfeT5r0 vCC4kvk5s5oaCjuT3N2welri79KNygdPzmRMU99lgOLd0/e04MaGcFoHirOotpSzylsF 5S9/fa2aOVNMbl8zlvaXvLpJkE9VoM2jlKriXcRfYC1ouD/mu4W2GkrbYIuSfDfCQLr1 ApFA== X-Gm-Message-State: AOAM532JuSN+73KaUlMEp8s1EJjV0CRFV0oxCuGvtdypQFRrTFSYFipL TJHIUuP6D85mjKu7gNw3eZs34C4K7oc= X-Google-Smtp-Source: ABdhPJwynHTB68DwvsWAVjiG8rSM/kHHHNQ70teJ+dR7LseKz9qmvzwpG0TxpNzjRrE6k7cH1DWiTw== X-Received: by 2002:a1c:f007:: with SMTP id a7mr41379225wmb.103.1593874209918; Sat, 04 Jul 2020 07:50:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 11/26] hw/usb/hcd-xhci: Add missing header Date: Sat, 4 Jul 2020 16:49:28 +0200 Message-Id: <20200704144943.18292-12-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Anthony Perard , Samuel Thibault , Leif Lindholm , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This header uses the USBPort type which is forward declared by "hw/usb.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/hcd-xhci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 946af51fc2..8edbdc2c3e 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -22,6 +22,8 @@ #ifndef HW_USB_HCD_XHCI_H #define HW_USB_HCD_XHCI_H =20 +#include "hw/usb.h" + #define TYPE_XHCI "base-xhci" #define TYPE_NEC_XHCI "nec-usb-xhci" #define TYPE_QEMU_XHCI "qemu-xhci" --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874604; cv=none; d=zohomail.com; s=zohoarc; b=DwbDuOAD5S9m2cRFUhHmkde09eVxT96rsXMU/7ji+qGoSa2Zhq22VWVf0iK99rmrKa5OIgtV/VIdDLA1GIC6AzuNf6PT4L5GkgrXhbOdotokp76VBNuZAQIvb57lkDPOIYZ3OO0NySr8GRA887TZevb6hofpyOrRNeudBHIaMOw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874604; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LIvjoiOYGW8qxH03j7d+uMoGgATq8ow1BJ8pj4MMInc=; b=eEHcWjPMYxhuk1mIsquTjb6GGJg/2dxLqGLNxpae5Vv1afsZmTGIhtn8dZ8BSW2DxgmBKtkzJS4Pa0H+yxwaGUgZAMdkGcGY5fo+b4luUnsqFHyCDAiHWpqGdt/EMjiYpRFrh5tg7WkIgI5Wi5LtCZQAlg8ox3HhlRHN1ei8un4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15938746044441011.8551984620847; Sat, 4 Jul 2020 07:56:44 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjag-0004tT-Fz; Sat, 04 Jul 2020 14:56:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVB-0003ES-Qj for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:49 +0000 Received: from mail-wm1-x342.google.com (unknown [2a00:1450:4864:20::342]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a9e8a022-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:50:12 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id 22so34725437wmg.1 for ; Sat, 04 Jul 2020 07:50:12 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:11 -0700 (PDT) X-Inumbo-ID: a9e8a022-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LIvjoiOYGW8qxH03j7d+uMoGgATq8ow1BJ8pj4MMInc=; b=K8OdEPUyesQSU/S5m5qok6/IcUiWOAZO7BMajTrjGs6JPbceMxtuZf8byY8tbJEGHX JEhvrKsqhFGfeStk45pdmkIx1Crd26UqdfRtBkDFTF1ZcEpMz4Y9f8h/NujfAZ8zhopU tcgLUIVhx4SR2VngYxvbMDeifVcrfHrvzA0aQukuywYfCwQ6dqY2ovVF7OMVfTiF2YPn DNxSIQBEYNKYXgGw5SLUtGuykIXaIqdYUBYTZrYeQbwEa/h1m7E4cIMUq8sIDEztAFSW sjbJhzGGYK8GyRliwIteCXYFpst00XbTUThRJIANJG3Mz51oqbQ9X/YLHxyeR4B28a9a b3LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LIvjoiOYGW8qxH03j7d+uMoGgATq8ow1BJ8pj4MMInc=; b=GBjuYTscOYDBbDgtp/qBQxOQkuwjlqJYKsftUl+tO8MLgS+KYzRv15oOIw73qK/mYy slmB4Hh5VioFNRHdC3snrMKbRL4C0WyKSnqgJ8qLZg8cfS0YAES3Jon3sEby/Bf+GTlE uGdCBoYhQAmzcOWinwaoVGZun5wCwvY564UPh91i5m9dkcnDLA3vKWeyKEb7rtg7L88F 4Y9BbH9udZC3EaB06pzAE4ENe7C1/QPWQhIr55KOTBgiSaiQZCA/dPpGv+N3kTpBPlYk hzzcmyxC+eX1HRurvvQvgyIH732rDyrMuTSELaZOGBj/aXpzqE7B1Z/LAg97808YTsjG Ukng== X-Gm-Message-State: AOAM531tAx7hfuExcOghhYP0TV06YfxaCwrCJ0mtqpzOIxi8FM83dbFU twg0iFait2LYekxyCIzZW3Y= X-Google-Smtp-Source: ABdhPJxJqnEAihzmKK5m10VR2mbQ1Jco3QSfcvHgpyoRQzFTU2aqsRISnZhnGEZBTtk3/AGxed2vTA== X-Received: by 2002:a7b:c313:: with SMTP id k19mr26876880wmj.67.1593874211964; Sat, 04 Jul 2020 07:50:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 12/26] hw/usb/hcd-musb: Restrict header scope Date: Sat, 4 Jul 2020 16:49:29 +0200 Message-Id: <20200704144943.18292-13-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) "hcd-musb.h" is only required by USB device implementions. As we keep these implementations in the hw/usb/ directory, move the header there. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- {include/hw =3D> hw}/usb/hcd-musb.h | 0 hw/usb/hcd-musb.c | 2 +- hw/usb/tusb6010.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename {include/hw =3D> hw}/usb/hcd-musb.h (100%) diff --git a/include/hw/usb/hcd-musb.h b/hw/usb/hcd-musb.h similarity index 100% rename from include/hw/usb/hcd-musb.h rename to hw/usb/hcd-musb.h diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index 85f5ff5bd4..b8d8766a4a 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -23,9 +23,9 @@ #include "qemu/osdep.h" #include "qemu/timer.h" #include "hw/usb.h" -#include "hw/usb/hcd-musb.h" #include "hw/irq.h" #include "hw/hw.h" +#include "hcd-musb.h" =20 /* Common USB registers */ #define MUSB_HDRC_FADDR 0x00 /* 8-bit */ diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 27eb28d3e4..9f9b81b09d 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -23,11 +23,11 @@ #include "qemu/module.h" #include "qemu/timer.h" #include "hw/usb.h" -#include "hw/usb/hcd-musb.h" #include "hw/arm/omap.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sysbus.h" +#include "hcd-musb.h" =20 #define TYPE_TUSB6010 "tusb6010" #define TUSB(obj) OBJECT_CHECK(TUSBState, (obj), TYPE_TUSB6010) --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874619; cv=none; d=zohomail.com; s=zohoarc; b=f4tsr8DlzZ275C0Bp3pGfPy2Gg8BuUgWQ/Jtt04hcRR/zaV4gG2TEMudU0JSpFUb1VEGOJ52SsqU/kHfxrG3CEUllLK72bnbEbX2nfcQMpZuv4tX7l6Hvrzos+39fBXNJGfrjLDibJS65/I1Q8UL37UUxf2uVOQWAGDH+BniqbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874619; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=k+8FH1LHVyWY5lxn8kaV6RhN5WT6vNL6Csn+tWtGqIU=; b=Q7sd1i9uAyTcWMAbzSgGwf4k75GmlZ4Hc5e3TEBqhXJojclUvbeWFvj6yKEKKOTmVsEsDTyGIH/WgicOkhHpgdLarQAjS3A2SlvJl7CgNh7EmdnuHzDUFyMaRoWL7q9imM6JT7GpFdykFXNCWnaoiVlLGljYt0uuqKU2gaw4M0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874619592177.34526603158758; Sat, 4 Jul 2020 07:56:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjat-00054s-PA; Sat, 04 Jul 2020 14:56:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVG-0003ES-R1 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:54 +0000 Received: from mail-wm1-x342.google.com (unknown [2a00:1450:4864:20::342]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ab2286ec-be05-11ea-8496-bc764e2007e4; Sat, 04 Jul 2020 14:50:14 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id o2so37044911wmh.2 for ; Sat, 04 Jul 2020 07:50:14 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:13 -0700 (PDT) X-Inumbo-ID: ab2286ec-be05-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k+8FH1LHVyWY5lxn8kaV6RhN5WT6vNL6Csn+tWtGqIU=; b=IB9L+DJ6fMSlRh6JnfVIyjRfs3r2+cKnkCMh6AOc0lm/+BaC+pa5gw3hPPcon8hyCC TQRh9Dsuy4N9iNSa+sDAo59Wb9OBUTJhWrGiQYUiHaJcD2YjCqcZFlX3q6wvN0kzv12y zjRWD0O+C14SgaG835wapqV4fOHwaoE+lia4hfdbd5Zyk+XJzdC2t6DGiCxQ8vTcnZgX 354/5VYBjRfY9uD1tT+MK47AGBcB3P1p8J9RpLbDsqF2ri9rbyNs8LgFGF8k/fGIcKWy wmxNBkxWFAH/E/5EdZfvMLkUm0kbfAlZiV+UjR0G1MRggb5dB2nI2Req9hTae4hUmE3t glLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=k+8FH1LHVyWY5lxn8kaV6RhN5WT6vNL6Csn+tWtGqIU=; b=MZIH5rHd4EJdp9pxTlRTLiGYMdF3qeb5auU+xu5I6gTmaLxMaIEjrabPIdqwTpwNOS n5c3ZVqsoKeeg4NjxLypxvRUUvroOna4ee6yGyTjfCqAgz60lcScih58bnyDg/uTJJWw +HSE9RnO57qHwLE0pwexr6X7Pu/aWNU5kxPHMKiYHmkiHRVwKjAM/aoon3dpPFFc0/5w VfnDhnU3feWr3NCp5TifbjFf+g7oQq8tyIKcX3d38t3Yf7Q7fpmA4+kXhbOfwbMTQX9a v1BTBaJ4Ba+Cuzn+eY8rfVH4jeYOtrBpMAicDkgsbWqX3h4j2LfWK1+TMJQr7HKQOQ21 X4Fw== X-Gm-Message-State: AOAM533F+nZPJraafRbz67xt8oPF8p9kdUiBrVwg9P83EopqRWezICiC USWTu41fj7QqNHwoW0Kpf6c= X-Google-Smtp-Source: ABdhPJzNTGufYfLMeOUgBhGaylb5O5upKi84ytezyRjwfpHgpubMO2vfpa3tyGQAl3MlqZSVzS+XTQ== X-Received: by 2002:a1c:48:: with SMTP id 69mr43033872wma.32.1593874214066; Sat, 04 Jul 2020 07:50:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 13/26] hw/usb/desc: Reduce some declarations scope Date: Sat, 4 Jul 2020 16:49:30 +0200 Message-Id: <20200704144943.18292-14-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) USBDescString is forward-declared. Only bus.c uses the usb_device_get_product_desc() and usb_device_get_usb_desc() function. Move all that to the "desc.h" header to reduce the big "hw/usb.h" header a bit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/desc.h | 10 ++++++++++ include/hw/usb.h | 10 ---------- hw/usb/bus.c | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/usb/desc.h b/hw/usb/desc.h index 92594fbe29..4bf6966c4b 100644 --- a/hw/usb/desc.h +++ b/hw/usb/desc.h @@ -242,4 +242,14 @@ int usb_desc_get_descriptor(USBDevice *dev, USBPacket = *p, int usb_desc_handle_control(USBDevice *dev, USBPacket *p, int request, int value, int index, int length, uint8_t *data); =20 +const char *usb_device_get_product_desc(USBDevice *dev); + +const USBDesc *usb_device_get_usb_desc(USBDevice *dev); + +struct USBDescString { + uint8_t index; + char *str; + QLIST_ENTRY(USBDescString) next; +}; + #endif /* QEMU_HW_USB_DESC_H */ diff --git a/include/hw/usb.h b/include/hw/usb.h index 15b2ef300a..18f1349bdc 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -192,12 +192,6 @@ typedef struct USBDescOther USBDescOther; typedef struct USBDescString USBDescString; typedef struct USBDescMSOS USBDescMSOS; =20 -struct USBDescString { - uint8_t index; - char *str; - QLIST_ENTRY(USBDescString) next; -}; - #define USB_MAX_ENDPOINTS 15 #define USB_MAX_INTERFACES 16 =20 @@ -555,10 +549,6 @@ int usb_device_alloc_streams(USBDevice *dev, USBEndpoi= nt **eps, int nr_eps, int streams); void usb_device_free_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps= ); =20 -const char *usb_device_get_product_desc(USBDevice *dev); - -const USBDesc *usb_device_get_usb_desc(USBDevice *dev); - /* quirks.c */ =20 /* In bulk endpoints are streaming data sources (iow behave like isoc eps)= */ diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 957559b18d..111c3af7c1 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -9,6 +9,7 @@ #include "monitor/monitor.h" #include "trace.h" #include "qemu/cutils.h" +#include "desc.h" =20 static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874623; cv=none; d=zohomail.com; s=zohoarc; b=D7XXxSBNeIhvH949Lxot2+C1UNEVqzIbz/0Vxr9gwgp0jXsGNo2qnVflx265VCE2HzZy7tX1dh2z89Ry8KN7fegsS3n0RRIWzxcguJxyVuN0GTXincLXYUG+6VWkTDZgrZaIu4EYE7ZAROWnvzESis0c1Xr2kNvkmPCZQFNFGvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874623; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xjjAqG2L8PiyECLv8vWl/nPN8wdvqzFPKnLDYj57EWU=; b=PfKIBeCIyuoJ3gHOGnBIzNpbfDmXVhPo3T9gF08EeYeiTKb35dL7T6b/3U2TVkI2tGlDzXyebRMfnOA6/N4hl02EmHQIE5xNANCMmwOz2vxLTaVf+0GRUuhbWzeSAzratk09EZd7D8IpNF9YP3FEBAZy7KimkbjsnBgSosr/IQE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874623977789.5266197249213; Sat, 4 Jul 2020 07:57:03 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjb1-0005Ga-29; Sat, 04 Jul 2020 14:56:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVL-0003ES-RK for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:50:59 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ac624880-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:50:16 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a6so24089448wmm.0 for ; Sat, 04 Jul 2020 07:50:16 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:15 -0700 (PDT) X-Inumbo-ID: ac624880-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xjjAqG2L8PiyECLv8vWl/nPN8wdvqzFPKnLDYj57EWU=; b=kGjxAbMk0Y+V1ZM0jG8F7zrUJeEpbEY2rUuWHyvQnUy2BC4TEa4D9G84sW8qU3Tnyi hXyLAakl5TAVaESh9mwcqIkW9kPRuFhF1CPBo0iqa9EzqOeUO8dcJwyom69eu1X7is1K GI/h4RCMamXhRltfPP+anRNrC4T3Xl/b+bRd7v5Nxqs6IBSrpiZ+NfMzkc3fyOz+zG/O qhZVj0cz4AUqg4attnXMbE/OWUZmlqtkxjHzNmmPiDdGXYHh9wyMp7La7dx/LG+WG1y0 7hKot5Tx+EVBqxTjnBKGlFKxDUcrNR10Wub/RcuZ75CfRChXgIvTj2rJ1blM2eTTB1qV uPjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xjjAqG2L8PiyECLv8vWl/nPN8wdvqzFPKnLDYj57EWU=; b=BlEDOZDvk569CRF8HkryQBb3ozQUYjdhSCo6rKJ6kMBMm7L1/UNLQ3zgLsN8yRZ3T/ kL1m6TzdYWrT82sJ/hMsknvX/xKfGwzUC+Q3eQRZNFNilV+0ROaTSX4aFbXJbaHllV1l R+qUPyIcoCr3Y7bKIdbkogVCZ8I7S+9ly1cg6R4ruYH0nobsJP9Pf0EZcp+/kgLdoMTV F8Rh5R2EIw9i+ygLyR0Q5bluiapZYBr1ldXfAPKVTmvQn8BTg7Jj0rUnv8i6gCRsrK/7 xzox/EFaxJ7FmySljFiPfE2VZBrJCNc4Qc0xeMNl/rAJJQSSuYcdZfEkxzoI2lrv38Z7 BNoA== X-Gm-Message-State: AOAM530kn5302bEYPm21F+PWkMpv261nQ5npHk7/b61Qtg3qpR0zv4ei dX20Gxsgiu+LycCAVXrQk78= X-Google-Smtp-Source: ABdhPJyylaQ90oaFVpyNttGYGyUpJwJRvbiuNFcOgPIhMsiwGOGXapRLVUD2ADJD/bSRm2sJT5Aq2g== X-Received: by 2002:a1c:6788:: with SMTP id b130mr42706142wmc.100.1593874216169; Sat, 04 Jul 2020 07:50:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 14/26] hw/usb/quirks: Rename included source with '.inc.c' suffix Date: Sat, 4 Jul 2020 16:49:31 +0200 Message-Id: <20200704144943.18292-15-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This file is not a header, but contains source code which is included and compiled once. We use the '.inc.c' suffix in few other cases in the repository. Follow the same convention with this file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/quirks.c | 2 +- hw/usb/{quirks.h =3D> quirks.inc.c} | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) rename hw/usb/{quirks.h =3D> quirks.inc.c} (99%) diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c index 23ea7a23ea..655b36f2d5 100644 --- a/hw/usb/quirks.c +++ b/hw/usb/quirks.c @@ -13,7 +13,7 @@ */ =20 #include "qemu/osdep.h" -#include "quirks.h" +#include "quirks.inc.c" #include "hw/usb.h" =20 static bool usb_id_match(const struct usb_device_id *ids, diff --git a/hw/usb/quirks.h b/hw/usb/quirks.inc.c similarity index 99% rename from hw/usb/quirks.h rename to hw/usb/quirks.inc.c index 50ef2f9c2e..004b228aba 100644 --- a/hw/usb/quirks.h +++ b/hw/usb/quirks.inc.c @@ -12,9 +12,6 @@ * (at your option) any later version. */ =20 -#ifndef HW_USB_QUIRKS_H -#define HW_USB_QUIRKS_H - /* 1 on 1 copy of linux/drivers/usb/serial/ftdi_sio_ids.h */ #include "quirks-ftdi-ids.h" /* 1 on 1 copy of linux/drivers/usb/serial/pl2303.h */ @@ -915,5 +912,3 @@ static const struct usb_device_id usbredir_ftdi_serial_= ids[] =3D { =20 #undef USB_DEVICE #undef USB_DEVICE_AND_INTERFACE_INFO - -#endif --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874603; cv=none; d=zohomail.com; s=zohoarc; b=Ac3fPJTO1v86tx6KzzPaMxhU+YLNj2wRKo26Q1UJgKal/ZdEqrZWPsSNUrpeeCZxOBca0oqnE9R3d3550Z0x00BD3mJjjoVJev/NRL6sdzsdVuwpdOLw3i+5It5QCryB6Nef0ll6Q9J61V9CMASgPFapeGbxZMr+Ao60PZaDKUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874603; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=F2y1uml1RkFfNsOb+m2iyzdDwj1uXo3NnuLQTrqdA9s=; b=AeaMaR2BHICK99mI+gElhg3OLH62Ehw9WkBea3guBDHRwsOg9FVn3vUKHw4ptFTZr85B/Bp2YR+EVwg49q7/lhOn93/NizlGPFiMXZkAUC5w/s2ReJvlvW38CqIAp/WAR7INwDcOGGdK3Aa63hOjY7qtywPOlDef/FyMqCz4EbI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874603335931.3862956701623; Sat, 4 Jul 2020 07:56:43 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjah-0004uv-2i; Sat, 04 Jul 2020 14:56:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVQ-0003ES-Rb for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:04 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ad8de00c-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:18 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id z2so13505031wrp.2 for ; Sat, 04 Jul 2020 07:50:18 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:17 -0700 (PDT) X-Inumbo-ID: ad8de00c-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F2y1uml1RkFfNsOb+m2iyzdDwj1uXo3NnuLQTrqdA9s=; b=XuFU4CBE8JCcfpdI/mR5sE2jyMeyBckQOwPMTtzwJf8CjscRTofonY09HxmwJm00NE hgXaGKtjBGKgBEytwuJ+1LT1UMvcBupnCU5041RZtHT4vwcBWQo/M/+GghnU6sLvVTLF Y0OX5yURCQg13pYSivq8FFPYj7wg8wOD1j0jENHOgxaRTzOtllVlw7cjPNFn2IWH1BIq Sm6KuoljtLR0LbF6gX5rfDBtKX6CprkJZYeXQzCIGgZcLZdQ6vORkbiRnRe5hvsbF/uS OWFgKWrvnxxqFL1fM5rMPeqOvIkLQG0cFB/v/CHa/YpQquR2m9B6/D1fPzqQ7wWU0wd9 8j+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=F2y1uml1RkFfNsOb+m2iyzdDwj1uXo3NnuLQTrqdA9s=; b=H/G7fkqj0E3OCviW9kEBbWZdxAr5nwASou7X2g/Hfk+J8LIjzErTqtdIR9EZ4w2sVv PAMOOmkMhcyJIzpJYqbsNNa1KdMY7mYkdxO8Jf22guUgkz/FprHaMOeHyHG/ovQ8QLVe RnUCnVPNRt6AFI9oYuBFiwWOWFlASNomhFdvxAG0GAcJQxKgQyW9PBmSwQBj4XWZj9mI zl1E30xKWdyn8qS9iJgM1KDv1YuGvmlKQqPBrDSrGZSRu7pAMhA0McdmHOUx64+615nT KQQw+N3pNDITS2CWIDXetMJD0eqm/wgC+UbrwlwDbt65k4gNZgm4nXSFyTCH1GAzgbim zPWw== X-Gm-Message-State: AOAM532/JnBDwUIaUrD2E0p1JxILIccKHN+e5nbylYeSaXBGT0x9lxIO RnVVGipftxcsKshHnCYibSg= X-Google-Smtp-Source: ABdhPJyq/7eRAGeHxJJ4O+Zutc0Mt3EntxvTem4i1yYIv/0yUmC2RdRBoUXQL+VySe0UhHY6Lv3gOQ== X-Received: by 2002:a5d:6a01:: with SMTP id m1mr43778986wru.115.1593874218068; Sat, 04 Jul 2020 07:50:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 15/26] hw/usb: Add new 'usb-quirks.h' local header Date: Sat, 4 Jul 2020 16:49:32 +0200 Message-Id: <20200704144943.18292-16-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Only redirect.c consumes the quirks API. Reduce the big "hw/usb.h" header by moving the quirks related declaration into their own header. As nothing out of hw/usb/ requires it, keep it local. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/usb-quirks.h | 27 +++++++++++++++++++++++++++ include/hw/usb.h | 11 ----------- hw/usb/quirks.c | 1 + hw/usb/redirect.c | 1 + 4 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 hw/usb/usb-quirks.h diff --git a/hw/usb/usb-quirks.h b/hw/usb/usb-quirks.h new file mode 100644 index 0000000000..542889efc4 --- /dev/null +++ b/hw/usb/usb-quirks.h @@ -0,0 +1,27 @@ +/* + * USB quirk handling + * + * Copyright (c) 2012 Red Hat, Inc. + * + * Red Hat Authors: + * Hans de Goede + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef HW_USB_QUIRKS_H +#define HW_USB_QUIRKS_H + +/* In bulk endpoints are streaming data sources (iow behave like isoc eps)= */ +#define USB_QUIRK_BUFFER_BULK_IN 0x01 +/* Bulk pkts in FTDI format, need special handling when combining packets = */ +#define USB_QUIRK_IS_FTDI 0x02 + +int usb_get_quirks(uint16_t vendor_id, uint16_t product_id, + uint8_t interface_class, uint8_t interface_subclass, + uint8_t interface_protocol); + +#endif diff --git a/include/hw/usb.h b/include/hw/usb.h index 18f1349bdc..8c3bc920ff 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -549,15 +549,4 @@ int usb_device_alloc_streams(USBDevice *dev, USBEndpoi= nt **eps, int nr_eps, int streams); void usb_device_free_streams(USBDevice *dev, USBEndpoint **eps, int nr_eps= ); =20 -/* quirks.c */ - -/* In bulk endpoints are streaming data sources (iow behave like isoc eps)= */ -#define USB_QUIRK_BUFFER_BULK_IN 0x01 -/* Bulk pkts in FTDI format, need special handling when combining packets = */ -#define USB_QUIRK_IS_FTDI 0x02 - -int usb_get_quirks(uint16_t vendor_id, uint16_t product_id, - uint8_t interface_class, uint8_t interface_subclass, - uint8_t interface_protocol); - #endif diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c index 655b36f2d5..b0d0f87e35 100644 --- a/hw/usb/quirks.c +++ b/hw/usb/quirks.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "quirks.inc.c" #include "hw/usb.h" +#include "usb-quirks.h" =20 static bool usb_id_match(const struct usb_device_id *ids, uint16_t vendor_id, uint16_t product_id, diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 417a60a2e6..4c5925a039 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -45,6 +45,7 @@ #include "hw/usb.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" +#include "usb-quirks.h" =20 /* ERROR is defined below. Remove any previous definition. */ #undef ERROR --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874617; cv=none; d=zohomail.com; s=zohoarc; b=CicFva4ibNocWgfarwggPkOy0fkgCcSwDZ15iedfdHg3IuMIpsuY1I/c62vDn8ZKPX6nGOb5zAqf9X9BitFGOwX1nn2dRo2+y4FYUYU9N/OXq7Vda4OE0LItIhspUG0h1ZiO9W+aaaavm0Sx7TSvWibDTODvZoqOPsz1XXZfsVg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874617; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LwCcRU3ITBZcN/p8m4Tvly+Gfq57t4rX34Kk3Uzziqs=; b=I3uhEPRw5to7AaiPws4e+lrvVm3PfxLZ6bW64eY4XFwZIrHDZX6ShEikmIuddEpOkhYxDui4e499dXPvKx6uJSXBRsXFLhIGTvW+dbTalr4y/D0ZF3xn5ztDAvvNv7N96JrAxPWZHKfDudJZyM/hHcxFv+VnEXHzdpOVDIBhFlk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874617670581.6605962997767; Sat, 4 Jul 2020 07:56:57 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjau-00055S-2o; Sat, 04 Jul 2020 14:56:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVV-0003ES-S5 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:09 +0000 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id aebbc98a-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:50:20 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id w3so24606974wmi.4 for ; Sat, 04 Jul 2020 07:50:20 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:19 -0700 (PDT) X-Inumbo-ID: aebbc98a-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LwCcRU3ITBZcN/p8m4Tvly+Gfq57t4rX34Kk3Uzziqs=; b=oKjMAbLQ2Nbdo7AVZTEMo5rKzXNXebbxS2YHgA5kZDA2Z2+DxgsuBaop4Nf7YP0t9g 825K7Sz5l6DRKW2FWV64F6Y8PFEbfBZ/8mNGGq8q8I/v/XzgiVoT/c6cLtJ4Wq4+y8s/ ZyQu3ZX70MOw0YMf2jRU84FoSuY8lwe6rfsONGi0EvhvcQH4agyx8WdTlthVPz7oUMLd 7gZ2JkRsngTeq9VmBw6iuSdlXJYxQF7UzAOPFbD80qjvobuW2TUKX0fMm3Fjk3Rm4noB rWoSeUrHYZkkLtcx+JFqgKhA77mwlMll57o/tAzzPnbS9XSESKlGwrsNVmP1tPkGSkA/ JlFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LwCcRU3ITBZcN/p8m4Tvly+Gfq57t4rX34Kk3Uzziqs=; b=Eh+6h058r+uOg2DywExGmoYyVrZlZ7+afOmZn0HxjUWbUzJ9BQ3nVptpCONutwHUbr N6dprYgypafELQGImKgW/WpwpiQRUWFUN+m4MqKnt2ZnE1dfMELbaA4pDcxbKYlCLxlt 7GhPlQoXw5QnLqjO3dKIym3s4On00GzF045osVhUtyf+hm2ynS5FPF4Q58fCMGro7whq tH3CDTTol9oZdEHyqYsryjHFw0bKY5XPtQtsmgS68QxK3NIxbu5tFsaBaW5vJXcWEEjo EzM9KkmMuSEmMSixrt187zqa9XM33c6YmdJzhbNhsZp6Wfi4qAskMAZzsoFepreKIqSN w/Nw== X-Gm-Message-State: AOAM53249mpe4B+m6mJKPNk73OAgEYMKJwMswanzTHf4qdHrveqjNDmg wY6Y73EtGCOa37PkRFR6YyM= X-Google-Smtp-Source: ABdhPJxv37a8GSHu9gIk53qyLIpPiec4lNJ044JwM140Yq2vwztlBB8+hQI1sx3Og8exNtb1rbIDuw== X-Received: by 2002:a1c:b686:: with SMTP id g128mr43033346wmf.145.1593874220071; Sat, 04 Jul 2020 07:50:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 16/26] hw/usb/bus: Simplify usb_get_dev_path() Date: Sat, 4 Jul 2020 16:49:33 +0200 Message-Id: <20200704144943.18292-17-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Simplify usb_get_dev_path() a bit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/bus.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 111c3af7c1..f8901e822c 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -580,19 +580,18 @@ static void usb_bus_dev_print(Monitor *mon, DeviceSta= te *qdev, int indent) static char *usb_get_dev_path(DeviceState *qdev) { USBDevice *dev =3D USB_DEVICE(qdev); - DeviceState *hcd =3D qdev->parent_bus->parent; - char *id =3D NULL; =20 if (dev->flags & (1 << USB_DEV_FLAG_FULL_PATH)) { - id =3D qdev_get_dev_path(hcd); - } - if (id) { - char *ret =3D g_strdup_printf("%s/%s", id, dev->port->path); - g_free(id); - return ret; - } else { - return g_strdup(dev->port->path); + DeviceState *hcd =3D qdev->parent_bus->parent; + char *id =3D qdev_get_dev_path(hcd); + + if (id) { + char *ret =3D g_strdup_printf("%s/%s", id, dev->port->path); + g_free(id); + return ret; + } } + return g_strdup(dev->port->path); } =20 static char *usb_get_fw_dev_path(DeviceState *qdev) --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874607; cv=none; d=zohomail.com; s=zohoarc; b=n03yLHPZ3tubcv6iZtwcId32i481JERXxXqfm3Udnqe52Vm29312ivnEbWYPs+Toojubw/5qOPQYyhb9K6hX/tIputpnjC95dR3oT9pOgNPwOfIfgVZagEtwaOFgHEmzsO+XVnqV+6r4MK7jt6mKjZS9BYuh8lNhExxI9EE3p14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874607; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bNYiPy+H907R6GvRggaZDEAvq/yJ89RNH5vqYDziYiQ=; b=WM8kFC/1sr4lLPvoFfIxP6RNcRsJkbc0DyskQ2AVH5CNolOzK8RU0FjRaG4jFQRWZJ/gKQmONKyZa7ai+8b3DdA3PqMkXwspME4sh0blpNqq4NAKwvLPsIW5O7RuujmUOkE6SaSp7IAM/9/1zX8iGgDf6XcxF3qWMq6CfZG7+Kg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874607453832.6801589077603; Sat, 4 Jul 2020 07:56:47 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjai-0004wQ-Ar; Sat, 04 Jul 2020 14:56:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVa-0003ES-S7 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:14 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id aff8b4ca-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:22 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id f2so7792991wrp.7 for ; Sat, 04 Jul 2020 07:50:22 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:21 -0700 (PDT) X-Inumbo-ID: aff8b4ca-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bNYiPy+H907R6GvRggaZDEAvq/yJ89RNH5vqYDziYiQ=; b=Zzt2Ao+qbpw+PyTf0gj3H8RK9KRIom4jWcvpaKOt4s1hW0V1FcCCbKJ+J1H1BoamQa X7yQWbLBOiWHDKwtYXNcSlpsadQlqloNBTBk3OoIeHNh7YjvW7yMB0amtIHW7A3uKNrF KIuBad86H5R6+A+garcJYO5R0cc0W1dnCsIKjrMacUlgm36Fhjt7sIWGaJjruzORr6Mw tCeATKmk7k/LQ9OiBic3Z6q8k1mV35zARhSfEfSLPMbQtj1CaWLLBsqEXHNhY7FCgnTB UPsPUgFVXy+a2LKVM7IwIcL6sBQUgKI3uk0ZNyDH/kMyxLLse6a/v9qA5iUjYWAwTnNg EH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=bNYiPy+H907R6GvRggaZDEAvq/yJ89RNH5vqYDziYiQ=; b=nfd2Pk/6tEDbYMMHxEt7/NsMuLcrXGhJnR/JpWW6Z5ScctMIIxOFZDxtrHui9+JWzF nTIlq0/IOquvgABI5lLp2aW1j5vSus+nOjjR1ypuUH/lp1m0Jt9G9Dc1BJ673eSPINas Ixlo+k5Qa+Jcwwlvy6/RC0tWAU0rZWut9LPMw7+Xeork7lCeAt9rC0vYZBHZtWBEovwk g3zrZe7T/QvzJFAXtvIDdL5qnapCTBreM1QFRJ9JBXQ+7HMgw6OhUwEZOjL+chB4PVf+ edmHFGV8Vd1wPd1k4ql2BQvX5aJb0qnHj1t/9jcjur5R5+3pWLTdJtc5U0OaKTLKnMp5 HSMQ== X-Gm-Message-State: AOAM531O6vL9VGk/Q0+yx3zW7UnUo4AY7M/S6h5UaJfje7VWhElZgPZs 7lLemYFpTd1+ttDFhFC6d68= X-Google-Smtp-Source: ABdhPJx8cXLO5EiX1MZNGYDXemombuB+cpvmJcqKanQIPyybTeiASdt/aAvkPNB3j02DjAjdPJizlA== X-Received: by 2002:adf:e74e:: with SMTP id c14mr43510389wrn.143.1593874222155; Sat, 04 Jul 2020 07:50:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 17/26] hw/usb/bus: Rename usb_get_dev_path() as usb_get_full_dev_path() Date: Sat, 4 Jul 2020 16:49:34 +0200 Message-Id: <20200704144943.18292-18-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If the device has USB_DEV_FLAG_FULL_PATH set, usb_get_dev_path() returns the full port path. Rename the function accordingly. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/usb/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/bus.c b/hw/usb/bus.c index f8901e822c..fad8194bf5 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -13,7 +13,7 @@ =20 static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); =20 -static char *usb_get_dev_path(DeviceState *dev); +static char *usb_get_full_dev_path(DeviceState *dev); static char *usb_get_fw_dev_path(DeviceState *qdev); static void usb_qdev_unrealize(DeviceState *qdev); =20 @@ -33,7 +33,7 @@ static void usb_bus_class_init(ObjectClass *klass, void *= data) HotplugHandlerClass *hc =3D HOTPLUG_HANDLER_CLASS(klass); =20 k->print_dev =3D usb_bus_dev_print; - k->get_dev_path =3D usb_get_dev_path; + k->get_dev_path =3D usb_get_full_dev_path; k->get_fw_dev_path =3D usb_get_fw_dev_path; hc->unplug =3D qdev_simple_device_unplug_cb; } @@ -577,7 +577,7 @@ static void usb_bus_dev_print(Monitor *mon, DeviceState= *qdev, int indent) dev->attached ? ", attached" : ""); } =20 -static char *usb_get_dev_path(DeviceState *qdev) +static char *usb_get_full_dev_path(DeviceState *qdev) { USBDevice *dev =3D USB_DEVICE(qdev); =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874604; cv=none; d=zohomail.com; s=zohoarc; b=Gy2imQiSRm4gl8pPcre192KBbNzzLDwfSI/SyTteHp0TdbnZs7eHi41/bSikeXtHd3UiDjK5Wl+LyemfCIzmXbC2/GOUCdz6FWcabWwEzhJLVE4yqjvA0mtPSoDg6rB+Ggd0GTR3vMm37pQhxfjQcdHoppCELDTCbqo+pLzYCw4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874604; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dSp90TZcMkhYVN1myg6NdGD6Nbq0gZQK2ClNXRKzwCU=; b=DB8yh0frEsOWxoZZR3c0V6eMb5xYiodm1NB5jH7M68JmW+YNLOEi/5EZuE0zlwUgZRcnzLcqYnzi/4iTjqvLbZmr5J4xs1tCL82pjpB+EazoFOS4taUrmkh2rUJdp+D1LL32xnhROixDK6UpHisAzen6+J5S7ygr6+8m1+KGpvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874604261414.2409577841612; Sat, 4 Jul 2020 07:56:44 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjag-0004tr-PA; Sat, 04 Jul 2020 14:56:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVf-0003ES-SR for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:19 +0000 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b13882c0-be05-11ea-8496-bc764e2007e4; Sat, 04 Jul 2020 14:50:25 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id o2so37045098wmh.2 for ; Sat, 04 Jul 2020 07:50:25 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:23 -0700 (PDT) X-Inumbo-ID: b13882c0-be05-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dSp90TZcMkhYVN1myg6NdGD6Nbq0gZQK2ClNXRKzwCU=; b=mKjsT3NYlThJ+LvUmtlSMZy5vL935vqJl78XXQCOfn95V8qATFdthcq6p9KJZvenD6 DffdeGJvs+v064CCp2bsGhza6HQ140vH4JRai4A3w+oS3o1wIspj2Cju5MMVDflqztas XqxwrLwqtwKNKEg6aekNLR2FAcywQVHY/ZPzG6wsvXMQx0+h11VfEUR7kqHBPv3peOBX gfriguM3HSKDBd5gYz5iWvxaoezeQw/GUCx443CDTct4IA4h1LI8tVQdQU/ugz11KIv+ BiB3KOhE8U5/19gm2x+V5J/zs6cl0vA9D1NhrqwmqhZr47fh9n3rf96aJTJhrioPyh+C odGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=dSp90TZcMkhYVN1myg6NdGD6Nbq0gZQK2ClNXRKzwCU=; b=TjEoeeww3uHlTl4SqPgds9lkfPdr9lA99tKeTbKV1xd7kTKos/CR6V6QPImASTalgP mUVrvpoxQZ1tbAt7AfuOhsNQtYQSSMEbVyG1daSbOMrQJgcuUuborwuhlJCQUGYFFLJ+ ee8he9ruVrtEagavUesNFujBBbFEvZM8Q00iTmyXSIPOF6j5ZZ3GBXqHuY1t8sdunFWh nINCntwptk8+RC+CT3KvHLSHATXYWo1F9yjZWQ1hVHEueJX5cy2dM3t012D+TlW6YgLx p98NDjZCKKlmx4H4IVFllIk+N8hfpPjUI1BvNrr243NdkZ2Eoz7xwg3nLglNY4wtLcCH qZMA== X-Gm-Message-State: AOAM530//WZ5nEDIk2F6F5xrdTLW7GWTZoPxU4QnUOdZ9roSjflskDyE AA4sqFjUmTD0lrKqeq2DPrQ= X-Google-Smtp-Source: ABdhPJzvKUoOtrkVjzZQp6DwlQyiHYdZ94BKN5ozpyFIsmy9iEQycoO+prQidokC2C86DctB5wk5ig== X-Received: by 2002:a1c:18e:: with SMTP id 136mr10977710wmb.93.1593874224206; Sat, 04 Jul 2020 07:50:24 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 18/26] hw/usb/bus: Add usb_get_port_path() Date: Sat, 4 Jul 2020 16:49:35 +0200 Message-Id: <20200704144943.18292-19-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Refactor usb_get_full_dev_path() to take a 'want_full_path' argument, and add usb_get_port_path() which returns a short path. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- include/hw/usb.h | 10 ++++++++++ hw/usb/bus.c | 18 +++++++++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index 8c3bc920ff..7ea502d421 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -506,6 +506,16 @@ void usb_port_location(USBPort *downstream, USBPort *u= pstream, int portnr); void usb_unregister_port(USBBus *bus, USBPort *port); void usb_claim_port(USBDevice *dev, Error **errp); void usb_release_port(USBDevice *dev); +/** + * usb_get_port_path: + * @dev: the USB device + * + * The returned data must be released with g_free() + * when no longer required. + * + * Returns: a dynamically allocated pathname. + */ +char *usb_get_port_path(USBDevice *dev); void usb_device_attach(USBDevice *dev, Error **errp); int usb_device_detach(USBDevice *dev); void usb_check_attach(USBDevice *dev, Error **errp); diff --git a/hw/usb/bus.c b/hw/usb/bus.c index fad8194bf5..518e5b94ed 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -577,12 +577,10 @@ static void usb_bus_dev_print(Monitor *mon, DeviceSta= te *qdev, int indent) dev->attached ? ", attached" : ""); } =20 -static char *usb_get_full_dev_path(DeviceState *qdev) +static char *usb_get_dev_path(USBDevice *dev, bool want_full_path) { - USBDevice *dev =3D USB_DEVICE(qdev); - - if (dev->flags & (1 << USB_DEV_FLAG_FULL_PATH)) { - DeviceState *hcd =3D qdev->parent_bus->parent; + if (want_full_path && (dev->flags & (1 << USB_DEV_FLAG_FULL_PATH))) { + DeviceState *hcd =3D DEVICE(dev)->parent_bus->parent; char *id =3D qdev_get_dev_path(hcd); =20 if (id) { @@ -594,6 +592,16 @@ static char *usb_get_full_dev_path(DeviceState *qdev) return g_strdup(dev->port->path); } =20 +static char *usb_get_full_dev_path(DeviceState *qdev) +{ + return usb_get_dev_path(USB_DEVICE(qdev), true); +} + +char *usb_get_port_path(USBDevice *dev) +{ + return usb_get_dev_path(dev, false); +} + static char *usb_get_fw_dev_path(DeviceState *qdev) { USBDevice *dev =3D USB_DEVICE(qdev); --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874622; cv=none; d=zohomail.com; s=zohoarc; b=SyZEsDNTtDuLkmsdhOwU7KHZ2LTB1J7N447MLQ14L0KjsR9SsC73LySsJE91zT3vxycxRASg0JKJETKTc/541PPmSHg4pEsqyIY90Ym1ZdxG/wHoKN7/sCDnv3AFSQ2C5FpLNP4HUfW9keeXQsRElK9Z1uX5B4O2dNINs7CWZLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874622; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lYK2LCkkm8mXjPosH/dQ8dVGr7IbLAxEMo5hKyX8gDM=; b=jwe8ixWnwpNDLqhdlON0iK3kjiGfNKmpkNvf6vTBed5ruvC8b2VG3OBrv3IDEy3zPx0va/TZzvIkgp/oPQVri61ZayTjwdge9ixv+r1SbuDQ56UdQa0yZrQStNukIqZ1CpjxqGgNC8oYeyYJjZJ7avuOMEmj4Wz6c6LOr2KO2qA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874622936550.497728571585; Sat, 4 Jul 2020 07:57:02 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjb0-0005Fr-PG; Sat, 04 Jul 2020 14:56:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVk-0003ES-Sf for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:24 +0000 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b2790e2a-be05-11ea-b7bb-bc764e2007e4; Sat, 04 Jul 2020 14:50:27 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id g10so12677787wmc.1 for ; Sat, 04 Jul 2020 07:50:27 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:25 -0700 (PDT) X-Inumbo-ID: b2790e2a-be05-11ea-b7bb-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lYK2LCkkm8mXjPosH/dQ8dVGr7IbLAxEMo5hKyX8gDM=; b=aXPSXSTXJgMKootuaitVYmZBSggQZgK5/msZtoZcg7I8jA8LHFIiATkIx5WCEZldCp SeaQ7H/JOLUc20KVhGcA7f0xl4oHCgEjVr98O8j746wh6K6hdXVhWWXSpum0kkLIE1Ll o0sWptvhIkbblNoImRzF3l09dCL3iVxJ0WW2ZeILMYy+tYCo1N5He53EBz1ZPY1YrT9P UVjDzzudJa9wnQi7oNvmU0XMFcjt7H4ZMvL4fKtFw3JleIBzE+YVCgrp2ICVwl2encpY Qq0n9vh6n8s2ZQnJVc4oUaSLVKsimpACr35vRSlpJj6uci1zi0CBBOOmhbGsI86MbzSm uOAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=lYK2LCkkm8mXjPosH/dQ8dVGr7IbLAxEMo5hKyX8gDM=; b=l+rlezrdqhdtyXXt3qbbltkAj6M++atsi2n0XhuPBckOQ+peFFUo/TPhzoNvpWvy/e lqyLjwEHDV5XQScoH8eQsN0zkeEIvb9G9UxtMoWMG4TnPFTmWTABTbiloQdVW+NKyDZV 2k/VPhAfj5MsX6Z+CvaoBUUT3/rb3K1cFWul/nmHnNrpHpQlvQZrv+nR9B/rT06uXcID WabBFUoVm7kte+GpGrDM3tieuhFhXtpfwTnYvjinSvoBGY9RcxlK56WgdY5zcEJlGr57 d4SzA6WwXwr2Cz13nxsOEI9O2LI5PTwyIVQCWBAafhcay74Mw/UM2TS2TGzkUFljZKwF rBSw== X-Gm-Message-State: AOAM533WKTiPFLIOw3kFH+MUu83ZPRUrludQAUziDzFT2locpCU1qHly 4h6gVM0BRY4xix/gpC2b1s8= X-Google-Smtp-Source: ABdhPJyYWdPo4hPIeG0V9hnWAf/4U3I+ZmZnVun1avHp1mFNCeVPmAKMwxtGlSjuHYbjFpIPmXDhOA== X-Received: by 2002:a1c:f301:: with SMTP id q1mr41171773wmq.110.1593874226397; Sat, 04 Jul 2020 07:50:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 19/26] hw/ppc/spapr: Use usb_get_port_path() Date: Sat, 4 Jul 2020 16:49:36 +0200 Message-Id: <20200704144943.18292-20-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) To avoid to access the USBDevice internals, and use the recently added usb_get_port_path() helper instead. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/ppc/spapr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f6f034d039..221d3e7a8c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3121,7 +3121,8 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p,= BusState *bus, * We use SRP luns of the form 01000000 | (usb-port << 16) | l= un * in the top 32 bits of the 64-bit LUN */ - unsigned usb_port =3D atoi(usb->port->path); + g_autofree char *usb_port_path =3D usb_get_port_path(usb); + unsigned usb_port =3D atoi(usb_port_path); unsigned id =3D 0x1000000 | (usb_port << 16) | d->lun; return g_strdup_printf("%s@%"PRIX64, qdev_fw_name(dev), (uint64_t)id << 32); @@ -3137,7 +3138,8 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p,= BusState *bus, if (strcmp("usb-host", qdev_fw_name(dev)) =3D=3D 0) { USBDevice *usbdev =3D CAST(USBDevice, dev, TYPE_USB_DEVICE); if (usb_host_dev_is_scsi_storage(usbdev)) { - return g_strdup_printf("storage@%s/disk", usbdev->port->path); + g_autofree char *usb_port_path =3D usb_get_port_path(usbdev); + return g_strdup_printf("storage@%s/disk", usb_port_path); } } =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874619; cv=none; d=zohomail.com; s=zohoarc; b=NDw7vd8guZS01zbQXeix2qB1jHWu2Xd052mnoiYg1b6b3G9Ty2yj5ctrdIT28Xi0Ua6WqJWSDP9cu1T1wc7+NTGvwfqaGO08QIX9OEvmPXjYdd1NzMSQEnbD3x7PGFZP8jEQRQw10wT1qB8jr9OpgYd6NwsJz/9B2aZN+A20oIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874619; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fJVcVH4doVw6Km6BSM1MV1lDhvP8r9rvGpMs+kFykbo=; b=fkkSsSpY1+R9oRl8AP2x9j0pODDlmO1O3/jv23IbgCWnasJmISeFMbmFiQR6VSr7XVsiWVEVKfKuz8zXo/3XWUjHSytWWjuqjVJdn6Fj/uNP8Ts0vdByoJOws+dZ2C1+CT6go9rFsX52zAxJik8do8Ynfm+0jIz1kHAe5XZqM2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874619897329.9976632964448; Sat, 4 Jul 2020 07:56:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjau-00056G-Er; Sat, 04 Jul 2020 14:56:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVp-0003ES-T1 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:29 +0000 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b3c731bc-be05-11ea-8496-bc764e2007e4; Sat, 04 Jul 2020 14:50:29 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id q15so34721985wmj.2 for ; Sat, 04 Jul 2020 07:50:29 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:27 -0700 (PDT) X-Inumbo-ID: b3c731bc-be05-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fJVcVH4doVw6Km6BSM1MV1lDhvP8r9rvGpMs+kFykbo=; b=K2lwgSpyWnjq/h8TiOfPsKpInIWHa5+dz+1p8VTR4XavTCAi4oZM+nXkVl8WOqLewb ozsFFf2OwYpYbdZ3eiEwdCdNFB8xk060HSlm2pDLSmkmpqjw2t8zgC7WWS6Rtc2pYFI6 pVhqULi6RzwvieAFZ+T/B0GoMZz0xSebo4MS/liGeIh0HixD4qcgipHRgT3GteBbaP3O NfDFlBiaubRh22WagrqyVHDevz3RsDYDG2zHsljANg3QGj+roWzdwYDe+wIiXCkn/EDo Tg6k/KyVg3AsKT99KsfBndK/TZAZVe77NfLq7pdi2mAnr6zr2XQ1x/QBBG4elYDZy0FK QunQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fJVcVH4doVw6Km6BSM1MV1lDhvP8r9rvGpMs+kFykbo=; b=WT8ixSKz5EaUKPqUvBcyTOwMcxBkrUcOsfmalOsMmUT3a0El1RGA/IrSYMMRfTuqK2 ObV18I01To2rGO+Y/hdkcFsuz/Ysw76Fhom84NqnrI9ycTD8qVJ9q3I+O15gyo++fZsd onXtwTRfQyPHZNH0HpWUTnYGteP4c8YJYuSRR12JKbM0YRJNvTh32RUCL6DsVbGWRP2i oihQlqYUzTu6mQXUO9/hdDvXOPjzf2pxsk6r+85xRRk3gEAx9NHIVKApEQkuAO23pSN7 J+2iirE09vK0XQMuBv3YYhf+dZliXBQ84uMlrtDPwW6FoKfB9kqXtGNIo4dNhaI+UxOj HJiQ== X-Gm-Message-State: AOAM530OTNXxatzadq/X3+8y2w16swIEi/FTcl2WN2sFGILrz5UqjxQ1 KBvlB76CL8sTqFuBw536IfQ= X-Google-Smtp-Source: ABdhPJwBkQVEoJtyk9IO8+500AN1sxUzaC/kjPlQwjEVcQTj3r8o+ql1zItIAXJmSwL9GUWTiy5ETg== X-Received: by 2002:a1c:5986:: with SMTP id n128mr28975302wmb.112.1593874228406; Sat, 04 Jul 2020 07:50:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 20/26] hw/usb: Introduce "hw/usb/usb.h" public API Date: Sat, 4 Jul 2020 16:49:37 +0200 Message-Id: <20200704144943.18292-21-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Only the USB devices require to access the USB internal APIs. The rest of the code base only wants to consume USB devices with a generic API. Move the generic declarations to the new "hw/usb/usb.h" header. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/usb.h | 27 +------------------- include/hw/usb/usb.h | 58 +++++++++++++++++++++++++++++++++++++++++++ chardev/baum.c | 2 +- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/ppc/mac_newworld.c | 2 +- hw/ppc/sam460ex.c | 1 + hw/ppc/spapr.c | 2 +- hw/sh4/r2d.c | 2 +- hw/usb/host-stub.c | 2 +- monitor/misc.c | 2 +- softmmu/vl.c | 2 +- 13 files changed, 70 insertions(+), 36 deletions(-) create mode 100644 include/hw/usb/usb.h diff --git a/include/hw/usb.h b/include/hw/usb.h index 7ea502d421..2ea5186ea5 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -26,6 +26,7 @@ */ =20 #include "hw/qdev-core.h" +#include "hw/usb/usb.h" #include "qemu/iov.h" #include "qemu/queue.h" =20 @@ -176,7 +177,6 @@ typedef struct USBBus USBBus; typedef struct USBBusOps USBBusOps; typedef struct USBPort USBPort; -typedef struct USBDevice USBDevice; typedef struct USBPacket USBPacket; typedef struct USBCombinedPacket USBCombinedPacket; typedef struct USBEndpoint USBEndpoint; @@ -256,9 +256,6 @@ struct USBDevice { const USBDescIface *ifaces[USB_MAX_INTERFACES]; }; =20 -#define TYPE_USB_DEVICE "usb-device" -#define USB_DEVICE(obj) \ - OBJECT_CHECK(USBDevice, (obj), TYPE_USB_DEVICE) #define USB_DEVICE_CLASS(klass) \ OBJECT_CLASS_CHECK(USBDeviceClass, (klass), TYPE_USB_DEVICE) #define USB_DEVICE_GET_CLASS(obj) \ @@ -459,15 +456,8 @@ void usb_device_reset(USBDevice *dev); void usb_wakeup(USBEndpoint *ep, unsigned int stream); void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p); =20 -/* usb-linux.c */ -void hmp_info_usbhost(Monitor *mon, const QDict *qdict); -bool usb_host_dev_is_scsi_storage(USBDevice *usbdev); - /* usb-bus.c */ =20 -#define TYPE_USB_BUS "usb-bus" -#define USB_BUS(obj) OBJECT_CHECK(USBBus, (obj), TYPE_USB_BUS) - struct USBBus { BusState qbus; USBBusOps *ops; @@ -489,13 +479,8 @@ struct USBBusOps { void usb_bus_new(USBBus *bus, size_t bus_size, USBBusOps *ops, DeviceState *host); void usb_bus_release(USBBus *bus); -USBBus *usb_bus_find(int busnr); void usb_legacy_register(const char *typename, const char *usbdevice_name, USBDevice *(*usbdevice_init)(const char *params)); -USBDevice *usb_new(const char *name); -bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp); -USBDevice *usb_create_simple(USBBus *bus, const char *name); -USBDevice *usbdevice_create(const char *cmdline); void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, USBPortOps *ops, int speedmask); void usb_register_companion(const char *masterbus, USBPort *ports[], @@ -506,16 +491,6 @@ void usb_port_location(USBPort *downstream, USBPort *u= pstream, int portnr); void usb_unregister_port(USBBus *bus, USBPort *port); void usb_claim_port(USBDevice *dev, Error **errp); void usb_release_port(USBDevice *dev); -/** - * usb_get_port_path: - * @dev: the USB device - * - * The returned data must be released with g_free() - * when no longer required. - * - * Returns: a dynamically allocated pathname. - */ -char *usb_get_port_path(USBDevice *dev); void usb_device_attach(USBDevice *dev, Error **errp); int usb_device_detach(USBDevice *dev); void usb_check_attach(USBDevice *dev, Error **errp); diff --git a/include/hw/usb/usb.h b/include/hw/usb/usb.h new file mode 100644 index 0000000000..9a13b08503 --- /dev/null +++ b/include/hw/usb/usb.h @@ -0,0 +1,58 @@ +/* + * QEMU USB API + * + * Copyright (c) 2005 Fabrice Bellard + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ +#ifndef QEMU_HW_USB_H +#define QEMU_HW_USB_H + +typedef struct USBDevice USBDevice; + +#define TYPE_USB_DEVICE "usb-device" +#define USB_DEVICE(obj) \ + OBJECT_CHECK(USBDevice, (obj), TYPE_USB_DEVICE) + +typedef struct USBBus USBBus; + +#define TYPE_USB_BUS "usb-bus" +#define USB_BUS(obj) OBJECT_CHECK(USBBus, (obj), TYPE_USB_BUS) + +USBBus *usb_bus_find(int busnr); +USBDevice *usb_new(const char *name); +bool usb_realize_and_unref(USBDevice *dev, USBBus *bus, Error **errp); +USBDevice *usb_create_simple(USBBus *bus, const char *name); +USBDevice *usbdevice_create(const char *cmdline); + +/** + * usb_get_port_path: + * @dev: the USB device + * + * The returned data must be released with g_free() + * when no longer required. + * + * Returns: a dynamically allocated pathname. + */ +char *usb_get_port_path(USBDevice *dev); + +void hmp_info_usbhost(Monitor *mon, const QDict *qdict); +bool usb_host_dev_is_scsi_storage(USBDevice *usbdev); + +#endif diff --git a/chardev/baum.c b/chardev/baum.c index 9c95e7bc79..fc04bf2e2f 100644 --- a/chardev/baum.c +++ b/chardev/baum.c @@ -28,7 +28,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "ui/console.h" #include #include diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4af9679d03..a890f57ac2 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -83,7 +83,7 @@ #include "qapi/qapi-visit-common.h" #include "qapi/visitor.h" #include "hw/core/cpu.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "hw/i386/intel_iommu.h" #include "hw/net/ne2000-isa.h" #include "standard-headers/asm-x86/bootparam.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1d832b2878..4d1de7cfab 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -36,7 +36,7 @@ #include "hw/firmware/smbios.h" #include "hw/pci/pci.h" #include "hw/pci/pci_ids.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "net/net.h" #include "hw/ide/pci.h" #include "hw/irq.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 047ea8db28..b985f5bea1 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -50,7 +50,7 @@ #include "hw/firmware/smbios.h" #include "hw/ide/pci.h" #include "hw/ide/ahci.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "sysemu/numa.h" diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 828c5992ae..7bf69f4a1f 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -69,7 +69,7 @@ #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "kvm_ppc.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" #include "trace.h" diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index fae970b142..781b45e14b 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -35,6 +35,7 @@ #include "hw/char/serial.h" #include "hw/i2c/ppc4xx_i2c.h" #include "hw/i2c/smbus_eeprom.h" +#include "hw/usb/usb.h" #include "hw/usb/hcd-ehci.h" #include "hw/ppc/fdt.h" #include "hw/qdev-properties.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 221d3e7a8c..0c0409077f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -70,7 +70,7 @@ =20 #include "exec/address-spaces.h" #include "exec/ram_addr.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "qemu/config-file.h" #include "qemu/error-report.h" #include "trace.h" diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 443820901d..a39c378855 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -40,7 +40,7 @@ #include "hw/ide.h" #include "hw/irq.h" #include "hw/loader.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "hw/block/flash.h" #include "exec/address-spaces.h" =20 diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c index 538ed29684..11b754892d 100644 --- a/hw/usb/host-stub.c +++ b/hw/usb/host-stub.c @@ -32,7 +32,7 @@ =20 #include "qemu/osdep.h" #include "ui/console.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "monitor/monitor.h" =20 void hmp_info_usbhost(Monitor *mon, const QDict *qdict) diff --git a/monitor/misc.c b/monitor/misc.c index 89bb970b00..65c0f887dd 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -26,7 +26,7 @@ #include "monitor-internal.h" #include "cpu.h" #include "monitor/qdev.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "hw/pci/pci.h" #include "sysemu/watchdog.h" #include "hw/loader.h" diff --git a/softmmu/vl.c b/softmmu/vl.c index 3e15ee2435..25a13e913e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -41,7 +41,7 @@ #include "qemu/error-report.h" #include "qemu/sockets.h" #include "sysemu/accel.h" -#include "hw/usb.h" +#include "hw/usb/usb.h" #include "hw/isa/isa.h" #include "hw/scsi/scsi.h" #include "hw/display/vga.h" --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1593874608; cv=none; d=zohomail.com; s=zohoarc; b=ko68LYMaX1kN2xDNJ8ogz6wiwAzI35URLyty17ltH4FsfdxHHxetivcSg4a1Rwqbi6EbO/2j+/eqizrDHLsPg4pjvz495DIqzUqmQR4JAmaDR8wW11hX7FdB+qE9KzuUc0JNq6ZuuQpilB78A3uN1qYgGi+fzQZYIQt1nh3pS6U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874608; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BVN2tL6FsOSYOSZ1Rnc/AWNY9pAl08p/yTnmHBA4/lE=; b=KBsvhl/ydBMDL92oG3ga4JX4JT2pw4Pzr0kXJKTqbVVnnqDWCbZwqiE34s2v1w1i4FDar+PN99i6SHQhUDY9+799uB1y1BHTB9Ynl5Pp24ssTeTx5gXmFegRkkmzwKSp0r1LQ7UckulOG2Cu4hGgpGDMLNl8ur7B1GZNh2wqYJU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874608925277.6649752791707; Sat, 4 Jul 2020 07:56:48 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjai-0004wt-LE; Sat, 04 Jul 2020 14:56:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVu-0003ES-T0 for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:34 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b54c7c68-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:31 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id q15so34722043wmj.2 for ; Sat, 04 Jul 2020 07:50:31 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:30 -0700 (PDT) X-Inumbo-ID: b54c7c68-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BVN2tL6FsOSYOSZ1Rnc/AWNY9pAl08p/yTnmHBA4/lE=; b=pCckQw2fpxMWuUrRXy5Fj3fHnP1lNxTV/c5641pZ9JVVlE/7SDn5Q+r8sSpmGeHEtX DQ82DdmBJfjkp7u54KKO9Ay1CQm1OqoeBDjN4toemHPaBd5JcfQL3QaYsoKMSYnMcZ86 cZkSflzpX4ea7A2bLQiMRirFJDw5g/vdSSr9sfwJoCmDfKl2BVC60kE20D3yzbnZa1ls bJh1WPioULkSM6b3/MugK1q0os9mcW2PgGSAqfRiQY3jHTvkj9TCGs9ygvVJCLAyMiEa nPCSpr4C+N0nVyXsOtCts8cDGKX+c88yfVcUQmPePkBlul0t7jTng4E9ABkXxABaOIFb KvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BVN2tL6FsOSYOSZ1Rnc/AWNY9pAl08p/yTnmHBA4/lE=; b=my7cNrqN+E9EYtMbSgLDkG+qhnBFTz+k0cP4b2wHNG1+2JHpqaWVya3UnTc0WLhIoR ZIn06Jo8tku9CBXdeT6f2F4k0AsxjG70wtXK2MZt/N4IHe1FRwaCMEZbinn/yp/WP3lo rFnpBfKDEiuJlPnJD4ry5tcxX4+IAVv5eRFYRod9uchjSUgSxZyOqiRuF/DCNnyGnCs5 uTrjDIpfc8ArBLYXtbBxLSdWQKluwxRkvSd9Z/TVgP5fb287vSlKYHG7GcOE9a5/11sP W+hFgn56wK0BbXboFniKCa10ZIgEaJ5wuB2chGDwFX7tshV2JuCIB4MLfkYs9SL8zzVS n+cg== X-Gm-Message-State: AOAM531GruCTHnBC0zIKqK2NFL4VCJQS9q0yw6YjX7ujkOTv/n5I2Fqu 5Zgkc80tPlytl7z3G8wOrok= X-Google-Smtp-Source: ABdhPJwaQwLIlLdyKxBkKPa8GBks7V8EDYQ/7hiL57HMX9nYvfh3kbH/YgCk6NdT+Qi4tqQqI6p6nw== X-Received: by 2002:a7b:cc08:: with SMTP id f8mr43795677wmh.106.1593874230724; Sat, 04 Jul 2020 07:50:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 21/26] hw/usb: Move internal API to local 'usb-internal.h' header Date: Sat, 4 Jul 2020 16:49:38 +0200 Message-Id: <20200704144943.18292-22-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Only the files under hw/usb/ require access to the USB internal API. Move include/hw/usb.h to hw/usb/usb-internal.h to reduce its scope. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/desc.h | 2 +- hw/usb/hcd-dwc2.h | 2 +- hw/usb/hcd-ehci.h | 2 +- hw/usb/hcd-ohci.h | 2 +- hw/usb/hcd-xhci.h | 2 +- include/hw/usb.h =3D> hw/usb/usb-internal.h | 7 +++---- hw/usb/bus.c | 2 +- hw/usb/combined-packet.c | 2 +- hw/usb/core.c | 2 +- hw/usb/desc-msos.c | 2 +- hw/usb/desc.c | 3 +-- hw/usb/dev-audio.c | 2 +- hw/usb/dev-hid.c | 2 +- hw/usb/dev-hub.c | 2 +- hw/usb/dev-mtp.c | 2 +- hw/usb/dev-network.c | 2 +- hw/usb/dev-serial.c | 2 +- hw/usb/dev-smartcard-reader.c | 2 +- hw/usb/dev-storage.c | 2 +- hw/usb/dev-uas.c | 2 +- hw/usb/dev-wacom.c | 2 +- hw/usb/hcd-dwc2.c | 1 + hw/usb/hcd-musb.c | 2 +- hw/usb/hcd-ohci-pci.c | 2 +- hw/usb/hcd-ohci.c | 1 - hw/usb/hcd-uhci.c | 2 +- hw/usb/hcd-xhci-nec.c | 3 +-- hw/usb/hcd-xhci.c | 2 +- hw/usb/host-libusb.c | 2 +- hw/usb/libhw.c | 2 +- hw/usb/quirks.c | 2 +- hw/usb/redirect.c | 2 +- hw/usb/tusb6010.c | 2 +- hw/usb/xen-usb.c | 2 +- MAINTAINERS | 1 - 35 files changed, 35 insertions(+), 39 deletions(-) rename include/hw/usb.h =3D> hw/usb/usb-internal.h (99%) diff --git a/hw/usb/desc.h b/hw/usb/desc.h index 4bf6966c4b..ee4f042602 100644 --- a/hw/usb/desc.h +++ b/hw/usb/desc.h @@ -2,7 +2,7 @@ #define QEMU_HW_USB_DESC_H =20 #include -#include "hw/usb.h" +#include "usb-internal.h" =20 /* binary representation */ typedef struct USBDescriptor { diff --git a/hw/usb/hcd-dwc2.h b/hw/usb/hcd-dwc2.h index 2adf0f53c7..2dfb3f3bc5 100644 --- a/hw/usb/hcd-dwc2.h +++ b/hw/usb/hcd-dwc2.h @@ -20,7 +20,7 @@ #define HW_USB_DWC2_H =20 #include "hw/sysbus.h" -#include "hw/usb.h" +#include "usb-internal.h" =20 #define DWC2_MMIO_SIZE 0x11000 =20 diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 4577f5e31d..337b3ad05c 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -19,10 +19,10 @@ #define HW_USB_HCD_EHCI_H =20 #include "qemu/timer.h" -#include "hw/usb.h" #include "sysemu/dma.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" +#include "usb-internal.h" =20 #define CAPA_SIZE 0x10 =20 diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h index 5c8819aedf..771927ea17 100644 --- a/hw/usb/hcd-ohci.h +++ b/hw/usb/hcd-ohci.h @@ -22,7 +22,7 @@ #define HCD_OHCI_H =20 #include "sysemu/dma.h" -#include "hw/usb.h" +#include "usb-internal.h" =20 /* Number of Downstream Ports on the root hub: */ #define OHCI_MAX_PORTS 15 diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 8edbdc2c3e..f9a3aaceec 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -22,7 +22,7 @@ #ifndef HW_USB_HCD_XHCI_H #define HW_USB_HCD_XHCI_H =20 -#include "hw/usb.h" +#include "usb-internal.h" =20 #define TYPE_XHCI "base-xhci" #define TYPE_NEC_XHCI "nec-usb-xhci" diff --git a/include/hw/usb.h b/hw/usb/usb-internal.h similarity index 99% rename from include/hw/usb.h rename to hw/usb/usb-internal.h index 2ea5186ea5..ceafb65936 100644 --- a/include/hw/usb.h +++ b/hw/usb/usb-internal.h @@ -1,8 +1,5 @@ -#ifndef QEMU_USB_H -#define QEMU_USB_H - /* - * QEMU USB API + * QEMU USB internal API * * Copyright (c) 2005 Fabrice Bellard * @@ -24,6 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN * THE SOFTWARE. */ +#ifndef QEMU_USB_INTERNAL_H +#define QEMU_USB_INTERNAL_H =20 #include "hw/qdev-core.h" #include "hw/usb/usb.h" diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 518e5b94ed..ba6c48e800 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -1,6 +1,5 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/module.h" @@ -9,6 +8,7 @@ #include "monitor/monitor.h" #include "trace.h" #include "qemu/cutils.h" +#include "usb-internal.h" #include "desc.h" =20 static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent); diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c index 5d57e883dc..28e19aad12 100644 --- a/hw/usb/combined-packet.c +++ b/hw/usb/combined-packet.c @@ -21,9 +21,9 @@ */ #include "qemu/osdep.h" #include "qemu/units.h" -#include "hw/usb.h" #include "qemu/iov.h" #include "trace.h" +#include "usb-internal.h" =20 static void usb_combined_packet_add(USBCombinedPacket *combined, USBPacket= *p) { diff --git a/hw/usb/core.c b/hw/usb/core.c index 5abd128b6b..6fed698d20 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -24,9 +24,9 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "qemu/iov.h" #include "trace.h" +#include "usb-internal.h" =20 void usb_pick_speed(USBPort *port) { diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c index 3a5ad7c8d0..79a8093f3f 100644 --- a/hw/usb/desc-msos.c +++ b/hw/usb/desc-msos.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" -#include "hw/usb.h" #include "desc.h" +#include "usb-internal.h" =20 /* * Microsoft OS Descriptors diff --git a/hw/usb/desc.c b/hw/usb/desc.c index 8b6eaea407..defb344014 100644 --- a/hw/usb/desc.c +++ b/hw/usb/desc.c @@ -1,8 +1,7 @@ #include "qemu/osdep.h" - -#include "hw/usb.h" #include "desc.h" #include "trace.h" +#include "usb-internal.h" =20 /* ------------------------------------------------------------------ */ =20 diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 1371c44f48..1e4d1051f3 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -32,10 +32,10 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "audio/audio.h" +#include "usb-internal.h" =20 static void usb_audio_reinit(USBDevice *dev, unsigned channels); =20 diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 89f63b698b..59b47272ba 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -25,7 +25,6 @@ =20 #include "qemu/osdep.h" #include "ui/console.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qapi/error.h" @@ -33,6 +32,7 @@ #include "qemu/timer.h" #include "hw/input/hid.h" #include "hw/qdev-properties.h" +#include "usb-internal.h" =20 /* HID interface requests */ #define GET_REPORT 0xa101 diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 5f19dd9fb5..b394ae9983 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -27,11 +27,11 @@ #include "qemu/timer.h" #include "trace.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qemu/error-report.h" #include "qemu/module.h" +#include "usb-internal.h" =20 #define MAX_PORTS 8 =20 diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 15a2243101..147e564bea 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -24,10 +24,10 @@ #include "qemu/filemonitor.h" #include "trace.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "qemu/units.h" +#include "usb-internal.h" =20 /* -----------------------------------------------------------------------= */ =20 diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index c69756709b..2e06d74f69 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -26,7 +26,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "net/net.h" @@ -37,6 +36,7 @@ #include "qemu/iov.h" #include "qemu/module.h" #include "qemu/cutils.h" +#include "usb-internal.h" =20 /*#define TRAFFIC_DEBUG*/ /* Thanks to NetChip Technologies for donating this product ID. diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 7e50e3ba47..4d3f91a85a 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -14,11 +14,11 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "chardev/char-serial.h" #include "chardev/char-fe.h" +#include "usb-internal.h" =20 //#define DEBUG_Serial =20 diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index fcfe216594..9602b25a10 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -41,9 +41,9 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" +#include "usb-internal.h" =20 #include "ccid.h" =20 diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index f5977eb72e..a58c84dffa 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -13,7 +13,6 @@ #include "qemu/module.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "hw/usb.h" #include "desc.h" #include "hw/qdev-properties.h" #include "hw/scsi/scsi.h" @@ -22,6 +21,7 @@ #include "sysemu/block-backend.h" #include "qapi/visitor.h" #include "qemu/cutils.h" +#include "usb-internal.h" =20 //#define DEBUG_MSD =20 diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index a3a4d41c07..9dc39f98a2 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -17,12 +17,12 @@ #include "qemu/main-loop.h" #include "qemu/module.h" =20 -#include "hw/usb.h" #include "migration/vmstate.h" #include "desc.h" #include "hw/qdev-properties.h" #include "hw/scsi/scsi.h" #include "scsi/constants.h" +#include "usb-internal.h" =20 /* --------------------------------------------------------------------- */ =20 diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 8aba44b8bc..7c162b7f85 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -28,10 +28,10 @@ =20 #include "qemu/osdep.h" #include "ui/console.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "qemu/module.h" #include "desc.h" +#include "usb-internal.h" =20 /* Interface requests */ #define WACOM_GET_REPORT 0x2101 diff --git a/hw/usb/hcd-dwc2.c b/hw/usb/hcd-dwc2.c index 252b60ef65..47ae18d510 100644 --- a/hw/usb/hcd-dwc2.c +++ b/hw/usb/hcd-dwc2.c @@ -43,6 +43,7 @@ #include "qemu/log.h" #include "hw/qdev-properties.h" #include "dwc2-regs.h" +#include "usb-internal.h" =20 #define USB_HZ_FS 12000000 #define USB_HZ_HS 96000000 diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c index b8d8766a4a..bc3efcce65 100644 --- a/hw/usb/hcd-musb.c +++ b/hw/usb/hcd-musb.c @@ -22,10 +22,10 @@ */ #include "qemu/osdep.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "hw/irq.h" #include "hw/hw.h" #include "hcd-musb.h" +#include "usb-internal.h" =20 /* Common USB registers */ #define MUSB_HDRC_FADDR 0x00 /* 8-bit */ diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index a7fb1666af..cb6bc55f59 100644 --- a/hw/usb/hcd-ohci-pci.c +++ b/hw/usb/hcd-ohci-pci.c @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" #include "hw/sysbus.h" @@ -29,6 +28,7 @@ #include "hw/qdev-properties.h" #include "trace.h" #include "hcd-ohci.h" +#include "usb-internal.h" =20 #define TYPE_PCI_OHCI "pci-ohci" #define PCI_OHCI(obj) OBJECT_CHECK(OHCIPCIState, (obj), TYPE_PCI_OHCI) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 1e6e85e86a..f4a85a8774 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -30,7 +30,6 @@ #include "qapi/error.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/sysbus.h" #include "hw/qdev-dma.h" diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 37f7beb3fa..1d4dd33b6c 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -27,7 +27,6 @@ */ =20 #include "qemu/osdep.h" -#include "hw/usb.h" #include "hw/usb/uhci-regs.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" @@ -39,6 +38,7 @@ #include "trace.h" #include "qemu/main-loop.h" #include "qemu/module.h" +#include "usb-internal.h" =20 #define FRAME_TIMER_FREQ 1000 =20 diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index e6a5a22b6d..24c59fa4b0 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -20,11 +20,10 @@ */ =20 #include "qemu/osdep.h" -#include "hw/usb.h" #include "qemu/module.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" - +#include "usb-internal.h" #include "hcd-xhci.h" =20 static Property nec_xhci_properties[] =3D { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index b330e36fe6..a3f6b14681 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -23,7 +23,6 @@ #include "qemu/timer.h" #include "qemu/module.h" #include "qemu/queue.h" -#include "hw/usb.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" @@ -33,6 +32,7 @@ #include "qapi/error.h" =20 #include "hcd-xhci.h" +#include "usb-internal.h" =20 //#define DEBUG_XHCI //#define DEBUG_DATA diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index ad7ed8fb0c..615655f2f5 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -50,7 +50,7 @@ #include "trace.h" =20 #include "hw/qdev-properties.h" -#include "hw/usb.h" +#include "usb-internal.h" =20 /* -----------------------------------------------------------------------= - */ =20 diff --git a/hw/usb/libhw.c b/hw/usb/libhw.c index 9c33a1640f..a8d7f994df 100644 --- a/hw/usb/libhw.c +++ b/hw/usb/libhw.c @@ -20,8 +20,8 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "hw/usb.h" #include "sysemu/dma.h" +#include "usb-internal.h" =20 int usb_packet_map(USBPacket *p, QEMUSGList *sgl) { diff --git a/hw/usb/quirks.c b/hw/usb/quirks.c index b0d0f87e35..c427d45f1e 100644 --- a/hw/usb/quirks.c +++ b/hw/usb/quirks.c @@ -14,7 +14,7 @@ =20 #include "qemu/osdep.h" #include "quirks.inc.c" -#include "hw/usb.h" +#include "usb-internal.h" #include "usb-quirks.h" =20 static bool usb_id_match(const struct usb_device_id *ids, diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 4c5925a039..a0c55de7f8 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -42,9 +42,9 @@ #include =20 #include "hw/qdev-properties.h" -#include "hw/usb.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" +#include "usb-internal.h" #include "usb-quirks.h" =20 /* ERROR is defined below. Remove any previous definition. */ diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c index 9f9b81b09d..191df38356 100644 --- a/hw/usb/tusb6010.c +++ b/hw/usb/tusb6010.c @@ -22,12 +22,12 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/usb.h" #include "hw/arm/omap.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sysbus.h" #include "hcd-musb.h" +#include "usb-internal.h" =20 #define TYPE_TUSB6010 "tusb6010" #define TUSB(obj) OBJECT_CHECK(TUSBState, (obj), TYPE_TUSB6010) diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 4d266d7bb4..a6a0b466f9 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -27,12 +27,12 @@ #include "qemu/main-loop.h" #include "qemu/option.h" #include "hw/sysbus.h" -#include "hw/usb.h" #include "hw/xen/xen-legacy-backend.h" #include "monitor/qdev.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" +#include "usb-internal.h" =20 #include "hw/xen/interface/io/usbif.h" =20 diff --git a/MAINTAINERS b/MAINTAINERS index dec252f38b..2566566d72 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1642,7 +1642,6 @@ F: hw/usb/* F: tests/qtest/usb-*-test.c F: docs/usb2.txt F: docs/usb-storage.txt -F: include/hw/usb.h F: include/hw/usb/ F: default-configs/usb.mak =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874619; cv=none; d=zohomail.com; s=zohoarc; b=J3IogZE3WmU0kVr8VCA7CcEoRnTYvxD30rizVUKEu4c19TlGzd59XQ924CCC+vaHX8zg3jz6InRe1L2AIeTyreQ96An4e9u2MBMfRIQdCJg5/1OoGIuJzfyz2APFw6qH9U1zd64HiDNCuSokLfXYyR2NzrJqb9YaBgj72WMqXiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874619; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KF2Q1IQk+ahap9W/Mry96hRo3DbCgSYQH2d1hiHR8iQ=; b=cA51VLSllt8aLiVM1cSuv4e+EjAqBDx2oLjNcTmq9RrFkHHpiPzV7RD83KuFh+PljqR3p+FLnL7xEM2TQvBeKeSiV9vfosoGKnPrXUP0suCItDvXdEOAkGxWK61Dtx/XYPUCaXY8o1u1jOk34BM4cISnspS8df9Avy/d6U70rr8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874619777753.2053716654552; Sat, 4 Jul 2020 07:56:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjau-000574-Q5; Sat, 04 Jul 2020 14:56:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjVz-0003ES-TP for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:39 +0000 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b69fe758-be05-11ea-bb8b-bc764e2007e4; Sat, 04 Jul 2020 14:50:34 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id l17so34722954wmj.0 for ; Sat, 04 Jul 2020 07:50:34 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:32 -0700 (PDT) X-Inumbo-ID: b69fe758-be05-11ea-bb8b-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KF2Q1IQk+ahap9W/Mry96hRo3DbCgSYQH2d1hiHR8iQ=; b=RAQhqu18T6VUpYh2sdm0xRNj5/bRNkZh4umN5tUrHagmbLZVJX5/84bq62eDrR0eRk z3xAlKtd4mj2nXuzVp01YdFzEidKPR5SSMCf2XRbQBhFNw6vfiX43SiZHk3XoEuT8rGw 0XBs5xe6RlJH9WthiHtBLxalHh7MNuQOFfjflsIqW2Levmjop8KiKovb6XSMlZ/odqsx Eurhi045hPTaj+DgftzLYGb5/vJ2sCgq0I6n/p2TlHk0th1/H61CjpOoS1X29Ei9kln4 PYApQ2P3+f7gIDHk/+ym0f3YFUXPcThbjrKZYGv8Wyf4ipGfh4vDG62307NToRXNR8oV ophA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KF2Q1IQk+ahap9W/Mry96hRo3DbCgSYQH2d1hiHR8iQ=; b=UcePVyNul3p8fG5iyKpiPCWD3++YaXsi21UXQFdUclIfbh4BGospKuQtaftGKDKXR4 ODi8YRTwav/iN/csMXXeiD/KMgNwKAxJce1PipzHEWpIuz4ryZgrH7Qs1Gm51LeBHEkj sd6dY6PFP/PSxYyPl0Wr+aWiOz22cCD1Ov78/BK6rXl2Ukva+8KTZjB3ijKb2dpNtf/u kDH2c3RbidXZPyftN0RISgsHw+8x2nFsva7tqXk5xIdcVk383p9/hjhAtYCGaO9EsXch DY+IXSmrRnL7uf80fm/yoRpHpWR8RqhkSAntATgCJ2zcgOoWScaCQNb7CgYXKixeq0E7 WE+Q== X-Gm-Message-State: AOAM533RsTy77Ngxd8Cox4LnWZl1yGL3UzGCycdx67vIi1K90gkbMdfF bXZICg6EFfQxP1maHeN57v4= X-Google-Smtp-Source: ABdhPJx2AAfoyUVngfkp8HcQ1LKQbbMiTCGjrFSeWkveBqg3nVRqfMGkyrx6NhSTUmnzJ5QBmiC+sw== X-Received: by 2002:a7b:c313:: with SMTP id k19mr26877648wmj.67.1593874233021; Sat, 04 Jul 2020 07:50:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 22/26] hw/usb/usb-hcd: Use OHCI type definitions Date: Sat, 4 Jul 2020 16:49:39 +0200 Message-Id: <20200704144943.18292-23-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Various machine/board/soc models create OHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: BALATON Zoltan Reviewed-by: Niek Linnenbank --- hw/usb/hcd-ohci.h | 2 +- include/hw/usb/usb-hcd.h | 16 ++++++++++++++++ hw/arm/allwinner-a10.c | 2 +- hw/arm/allwinner-h3.c | 9 +++++---- hw/arm/pxa2xx.c | 3 ++- hw/arm/realview.c | 3 ++- hw/arm/versatilepb.c | 3 ++- hw/display/sm501.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/sam460ex.c | 3 ++- hw/ppc/spapr.c | 3 ++- hw/usb/hcd-ohci-pci.c | 2 +- 13 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 include/hw/usb/usb-hcd.h diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h index 771927ea17..6949cf0dab 100644 --- a/hw/usb/hcd-ohci.h +++ b/hw/usb/hcd-ohci.h @@ -21,6 +21,7 @@ #ifndef HCD_OHCI_H #define HCD_OHCI_H =20 +#include "hw/usb/usb-hcd.h" #include "sysemu/dma.h" #include "usb-internal.h" =20 @@ -91,7 +92,6 @@ typedef struct OHCIState { void (*ohci_die)(struct OHCIState *ohci); } OHCIState; =20 -#define TYPE_SYSBUS_OHCI "sysbus-ohci" #define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_= OHCI) =20 typedef struct { diff --git a/include/hw/usb/usb-hcd.h b/include/hw/usb/usb-hcd.h new file mode 100644 index 0000000000..21fdfaf22d --- /dev/null +++ b/include/hw/usb/usb-hcd.h @@ -0,0 +1,16 @@ +/* + * QEMU USB HCD types + * + * Copyright (c) 2020 Philippe Mathieu-Daud=C3=A9 + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_USB_HCD_TYPES_H +#define HW_USB_HCD_TYPES_H + +/* OHCI */ +#define TYPE_SYSBUS_OHCI "sysbus-ohci" +#define TYPE_PCI_OHCI "pci-ohci" + +#endif diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index 52e0d83760..53c24ff602 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -25,7 +25,7 @@ #include "hw/misc/unimp.h" #include "sysemu/sysemu.h" #include "hw/boards.h" -#include "hw/usb/hcd-ohci.h" +#include "hw/usb/usb-hcd.h" =20 #define AW_A10_MMC0_BASE 0x01c0f000 #define AW_A10_PIC_REG_BASE 0x01c20400 diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c index 8e09468e86..d1d90ffa79 100644 --- a/hw/arm/allwinner-h3.c +++ b/hw/arm/allwinner-h3.c @@ -28,6 +28,7 @@ #include "hw/sysbus.h" #include "hw/char/serial.h" #include "hw/misc/unimp.h" +#include "hw/usb/usb-hcd.h" #include "hw/usb/hcd-ehci.h" #include "hw/loader.h" #include "sysemu/sysemu.h" @@ -381,16 +382,16 @@ static void allwinner_h3_realize(DeviceState *dev, Er= ror **errp) qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_EHCI3)); =20 - sysbus_create_simple("sysbus-ohci", s->memmap[AW_H3_OHCI0], + sysbus_create_simple(TYPE_SYSBUS_OHCI, s->memmap[AW_H3_OHCI0], qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_OHCI0)); - sysbus_create_simple("sysbus-ohci", s->memmap[AW_H3_OHCI1], + sysbus_create_simple(TYPE_SYSBUS_OHCI, s->memmap[AW_H3_OHCI1], qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_OHCI1)); - sysbus_create_simple("sysbus-ohci", s->memmap[AW_H3_OHCI2], + sysbus_create_simple(TYPE_SYSBUS_OHCI, s->memmap[AW_H3_OHCI2], qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_OHCI2)); - sysbus_create_simple("sysbus-ohci", s->memmap[AW_H3_OHCI3], + sysbus_create_simple(TYPE_SYSBUS_OHCI, s->memmap[AW_H3_OHCI3], qdev_get_gpio_in(DEVICE(&s->gic), AW_H3_GIC_SPI_OHCI3)); =20 diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index f104a33463..27196170f5 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -18,6 +18,7 @@ #include "hw/arm/pxa.h" #include "sysemu/sysemu.h" #include "hw/char/serial.h" +#include "hw/usb/usb-hcd.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" #include "hw/qdev-properties.h" @@ -2196,7 +2197,7 @@ PXA2xxState *pxa270_init(MemoryRegion *address_space, s->ssp[i] =3D (SSIBus *)qdev_get_child_bus(dev, "ssi"); } =20 - sysbus_create_simple("sysbus-ohci", 0x4c000000, + sysbus_create_simple(TYPE_SYSBUS_OHCI, 0x4c000000, qdev_get_gpio_in(s->pic, PXA2XX_PIC_USBH1)); =20 s->pcmcia[0] =3D pxa2xx_pcmcia_init(address_space, 0x20000000); diff --git a/hw/arm/realview.c b/hw/arm/realview.c index b6c0a1adb9..0aa34bd4c2 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -16,6 +16,7 @@ #include "hw/net/lan9118.h" #include "hw/net/smc91c111.h" #include "hw/pci/pci.h" +#include "hw/usb/usb-hcd.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -256,7 +257,7 @@ static void realview_init(MachineState *machine, sysbus_connect_irq(busdev, 3, pic[51]); pci_bus =3D (PCIBus *)qdev_get_child_bus(dev, "pci"); if (machine_usb(machine)) { - pci_create_simple(pci_bus, -1, "pci-ohci"); + pci_create_simple(pci_bus, -1, TYPE_PCI_OHCI); } n =3D drive_get_max_bus(IF_SCSI); while (n >=3D 0) { diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index e596b8170f..3e6224dc96 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -17,6 +17,7 @@ #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/pci/pci.h" +#include "hw/usb/usb-hcd.h" #include "hw/i2c/i2c.h" #include "hw/i2c/arm_sbcon_i2c.h" #include "hw/irq.h" @@ -273,7 +274,7 @@ static void versatile_init(MachineState *machine, int b= oard_id) } } if (machine_usb(machine)) { - pci_create_simple(pci_bus, -1, "pci-ohci"); + pci_create_simple(pci_bus, -1, TYPE_PCI_OHCI); } n =3D drive_get_max_bus(IF_SCSI); while (n >=3D 0) { diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 9cccc68c35..5f076c841f 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -33,6 +33,7 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "hw/pci/pci.h" +#include "hw/usb/usb-hcd.h" #include "hw/qdev-properties.h" #include "hw/i2c/i2c.h" #include "hw/display/i2c-ddc.h" @@ -1961,7 +1962,7 @@ static void sm501_realize_sysbus(DeviceState *dev, Er= ror **errp) sysbus_init_mmio(sbd, &s->state.mmio_region); =20 /* bridge to usb host emulation module */ - usb_dev =3D qdev_new("sysbus-ohci"); + usb_dev =3D qdev_new(TYPE_SYSBUS_OHCI); qdev_prop_set_uint32(usb_dev, "num-ports", 2); qdev_prop_set_uint64(usb_dev, "dma-offset", s->base); sysbus_realize_and_unref(SYS_BUS_DEVICE(usb_dev), &error_fatal); diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 7bf69f4a1f..3c32c1831b 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -55,6 +55,7 @@ #include "hw/input/adb.h" #include "hw/ppc/mac_dbdma.h" #include "hw/pci/pci.h" +#include "hw/usb/usb-hcd.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -411,7 +412,7 @@ static void ppc_core99_init(MachineState *machine) } =20 if (machine->usb) { - pci_create_simple(pci_bus, -1, "pci-ohci"); + pci_create_simple(pci_bus, -1, TYPE_PCI_OHCI); =20 /* U3 needs to use USB for input because Linux doesn't support via= -cuda on PPC64 */ diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index f8c204ead7..a429a3e1df 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -37,6 +37,7 @@ #include "hw/isa/isa.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" +#include "hw/usb/usb-hcd.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/char/escc.h" @@ -301,7 +302,7 @@ static void ppc_heathrow_init(MachineState *machine) qdev_realize_and_unref(dev, adb_bus, &error_fatal); =20 if (machine_usb(machine)) { - pci_create_simple(pci_bus, -1, "pci-ohci"); + pci_create_simple(pci_bus, -1, TYPE_PCI_OHCI); } =20 if (graphic_depth !=3D 15 && graphic_depth !=3D 32 && graphic_depth != =3D 8) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 781b45e14b..ac60d17a86 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -36,6 +36,7 @@ #include "hw/i2c/ppc4xx_i2c.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/usb/usb.h" +#include "hw/usb/usb-hcd.h" #include "hw/usb/hcd-ehci.h" #include "hw/ppc/fdt.h" #include "hw/qdev-properties.h" @@ -372,7 +373,7 @@ static void sam460ex_init(MachineState *machine) =20 /* USB */ sysbus_create_simple(TYPE_PPC4xx_EHCI, 0x4bffd0400, uic[2][29]); - dev =3D qdev_new("sysbus-ohci"); + dev =3D qdev_new(TYPE_SYSBUS_OHCI); qdev_prop_set_string(dev, "masterbus", "usb-bus.0"); qdev_prop_set_uint32(dev, "num-ports", 6); sbdev =3D SYS_BUS_DEVICE(dev); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0c0409077f..db1706a66c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -71,6 +71,7 @@ #include "exec/address-spaces.h" #include "exec/ram_addr.h" #include "hw/usb/usb.h" +#include "hw/usb/usb-hcd.h" #include "qemu/config-file.h" #include "qemu/error-report.h" #include "trace.h" @@ -2958,7 +2959,7 @@ static void spapr_machine_init(MachineState *machine) =20 if (machine->usb) { if (smc->use_ohci_by_default) { - pci_create_simple(phb->bus, -1, "pci-ohci"); + pci_create_simple(phb->bus, -1, TYPE_PCI_OHCI); } else { pci_create_simple(phb->bus, -1, "nec-usb-xhci"); } diff --git a/hw/usb/hcd-ohci-pci.c b/hw/usb/hcd-ohci-pci.c index cb6bc55f59..14df83ec2e 100644 --- a/hw/usb/hcd-ohci-pci.c +++ b/hw/usb/hcd-ohci-pci.c @@ -29,8 +29,8 @@ #include "trace.h" #include "hcd-ohci.h" #include "usb-internal.h" +#include "hw/usb/usb-hcd.h" =20 -#define TYPE_PCI_OHCI "pci-ohci" #define PCI_OHCI(obj) OBJECT_CHECK(OHCIPCIState, (obj), TYPE_PCI_OHCI) =20 typedef struct { --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874624; cv=none; d=zohomail.com; s=zohoarc; b=JY0yBH1XJUhIZaZsOuATWyRTBQLfHKM8i7iRJMKmcz6WsxtEjLhPSLf+OzbkskZFcbfQt07sKGk3+UJKiwqsaSsndt1oNXXGN2R2II4e/WAfmELPgAa/UVy/GPhd43lx6hfBSZcvFdGW7/o9sUZc1dl1/Nb2/lcoNXiw1kizJBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874624; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f29/MIGKjiVCXNbXb7QXhmc4KA4eor+Mhn/A2jA2iWs=; b=NQv2VcUCh63aemf0zNvybljouqWAxji09067E4UFu006vKB19E9hJDl/W2CbRZ2QrqSSFW8NXJyh0iBubQvDGQLl/WW/HNVuAvT46Kll6iGzXNBl3+bR/5grLoYx07glcv1NWVrSy1IfZQimXPMsDvTue+9BIak+TxVEcqE/IUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 159387462413747.949498742769606; Sat, 4 Jul 2020 07:57:04 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjb0-0005FP-Eo; Sat, 04 Jul 2020 14:56:50 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjW9-0003ES-TV for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:49 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b7e5f6b6-be05-11ea-bb8b-bc764e2007e4; Sat, 04 Jul 2020 14:50:36 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id f18so37074799wml.3 for ; Sat, 04 Jul 2020 07:50:36 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:34 -0700 (PDT) X-Inumbo-ID: b7e5f6b6-be05-11ea-bb8b-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f29/MIGKjiVCXNbXb7QXhmc4KA4eor+Mhn/A2jA2iWs=; b=aB1S25DGnSIIYyLepd0/DAdWudVgoTXK9tCwzyeK195D7VcOpmizNyVX6hZ+Hw2qEs azVFVrdxwL3VuODlB4q4QqZfMjPTxFOKhd3QaNoTlI3BCwrwaIJCdaN/9hDuogPt7S1W uMkSVz50tiyCDufVzR9ruwvMAD7Cy57YADj/X/TkNbbAOo6IdzPigDU6+Qt9UnoF1S0U 2gQlMm3UZYz9RaiNodxR9aWaZAJ7LbmPd+BGW5Mh8hxVh31zMr93bGQmvMf+wmWascsB JSWvSnk5sXCB2K4BvDiMtrGexuQVS2ZsqDG1irobpKigzLZqPl++eLsBBaNhhanPYtWu xagQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=f29/MIGKjiVCXNbXb7QXhmc4KA4eor+Mhn/A2jA2iWs=; b=ZrLw5pKI1K2QyUF3y1QYnTWMGaMl3YYSs0uGnYqk7ICHLP1N/S1iClT1m+5RXxDmLE 0Cdv7T2DUTx6yu5s6yiKUOELT+tVs6uIJGY3SMqAs8X+w8uKMoO3H06FbSvlLULmNvY2 h7QeQkmeB4YQX0wY92+tNckdCSjmrHDXbtfcPS+ztM4pV1Ez1f9Gsp8e6mIZDVrdd+Zk HzU2pJ+KqUvkOGgbJec94wwLajalt/IrnpcjgLPtknWOReOvQ93VMJjlfY3kWIitoI9B h4Y2MoAjbjOIs8oBwLhqwSldnG7uMSwonDoxRu2SqeSY60oletBWLXIkoVFGUww2QbTS yopQ== X-Gm-Message-State: AOAM532ap1oG4PoQdGme4cMYWtuN8Fgqpk3L4CSv2tCyRJMyiZ9TGqgi HpAUdwIDLfdoGursw4pzuSE= X-Google-Smtp-Source: ABdhPJzXh5fqsqOLbUyvdsrfc19bAAQd0SyMWAd0LLQtMbMkVi1HDhynYNEmZjRrZ57ugrqA88FVFA== X-Received: by 2002:a1c:2183:: with SMTP id h125mr43989795wmh.83.1593874235357; Sat, 04 Jul 2020 07:50:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 23/26] hw/usb/usb-hcd: Use EHCI type definitions Date: Sat, 4 Jul 2020 16:49:40 +0200 Message-Id: <20200704144943.18292-24-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Various machine/board/soc models create EHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/hcd-ehci.h | 11 +---------- include/hw/usb/chipidea.h | 2 +- include/hw/usb/usb-hcd.h | 11 +++++++++++ hw/arm/allwinner-h3.c | 1 - hw/arm/exynos4210.c | 2 +- hw/arm/sbsa-ref.c | 3 ++- hw/arm/xilinx_zynq.c | 2 +- hw/ppc/sam460ex.c | 1 - hw/usb/chipidea.c | 1 + hw/usb/hcd-ehci-sysbus.c | 1 + 10 files changed, 19 insertions(+), 16 deletions(-) diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h index 337b3ad05c..da70767409 100644 --- a/hw/usb/hcd-ehci.h +++ b/hw/usb/hcd-ehci.h @@ -23,6 +23,7 @@ #include "hw/pci/pci.h" #include "hw/sysbus.h" #include "usb-internal.h" +#include "hw/usb/usb-hcd.h" =20 #define CAPA_SIZE 0x10 =20 @@ -316,7 +317,6 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, E= rror **errp); void usb_ehci_unrealize(EHCIState *s, DeviceState *dev); void ehci_reset(void *opaque); =20 -#define TYPE_PCI_EHCI "pci-ehci-usb" #define PCI_EHCI(obj) OBJECT_CHECK(EHCIPCIState, (obj), TYPE_PCI_EHCI) =20 typedef struct EHCIPCIState { @@ -327,15 +327,6 @@ typedef struct EHCIPCIState { EHCIState ehci; } EHCIPCIState; =20 - -#define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb" -#define TYPE_PLATFORM_EHCI "platform-ehci-usb" -#define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb" -#define TYPE_AW_H3_EHCI "aw-h3-ehci-usb" -#define TYPE_TEGRA2_EHCI "tegra2-ehci-usb" -#define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb" -#define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb" - #define SYS_BUS_EHCI(obj) \ OBJECT_CHECK(EHCISysBusState, (obj), TYPE_SYS_BUS_EHCI) #define SYS_BUS_EHCI_CLASS(class) \ diff --git a/include/hw/usb/chipidea.h b/include/hw/usb/chipidea.h index 1ec2e9dbda..28f46291de 100644 --- a/include/hw/usb/chipidea.h +++ b/include/hw/usb/chipidea.h @@ -2,6 +2,7 @@ #define CHIPIDEA_H =20 #include "hw/usb/hcd-ehci.h" +#include "hw/usb/usb-hcd.h" =20 typedef struct ChipideaState { /*< private >*/ @@ -10,7 +11,6 @@ typedef struct ChipideaState { MemoryRegion iomem[3]; } ChipideaState; =20 -#define TYPE_CHIPIDEA "usb-chipidea" #define CHIPIDEA(obj) OBJECT_CHECK(ChipideaState, (obj), TYPE_CHIPIDEA) =20 #endif /* CHIPIDEA_H */ diff --git a/include/hw/usb/usb-hcd.h b/include/hw/usb/usb-hcd.h index 21fdfaf22d..74af3a4533 100644 --- a/include/hw/usb/usb-hcd.h +++ b/include/hw/usb/usb-hcd.h @@ -13,4 +13,15 @@ #define TYPE_SYSBUS_OHCI "sysbus-ohci" #define TYPE_PCI_OHCI "pci-ohci" =20 +/* EHCI */ +#define TYPE_SYS_BUS_EHCI "sysbus-ehci-usb" +#define TYPE_PCI_EHCI "pci-ehci-usb" +#define TYPE_PLATFORM_EHCI "platform-ehci-usb" +#define TYPE_EXYNOS4210_EHCI "exynos4210-ehci-usb" +#define TYPE_AW_H3_EHCI "aw-h3-ehci-usb" +#define TYPE_TEGRA2_EHCI "tegra2-ehci-usb" +#define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb" +#define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb" +#define TYPE_CHIPIDEA "usb-chipidea" + #endif diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c index d1d90ffa79..8b7adddc27 100644 --- a/hw/arm/allwinner-h3.c +++ b/hw/arm/allwinner-h3.c @@ -29,7 +29,6 @@ #include "hw/char/serial.h" #include "hw/misc/unimp.h" #include "hw/usb/usb-hcd.h" -#include "hw/usb/hcd-ehci.h" #include "hw/loader.h" #include "sysemu/sysemu.h" #include "hw/arm/allwinner-h3.h" diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index fa639806ec..692fb02159 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -35,7 +35,7 @@ #include "hw/qdev-properties.h" #include "hw/arm/exynos4210.h" #include "hw/sd/sdhci.h" -#include "hw/usb/hcd-ehci.h" +#include "hw/usb/usb-hcd.h" =20 #define EXYNOS4210_CHIPID_ADDR 0x10000000 =20 diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 021e7c1b8b..4e4c338ae9 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -38,6 +38,7 @@ #include "hw/loader.h" #include "hw/pci-host/gpex.h" #include "hw/qdev-properties.h" +#include "hw/usb/usb-hcd.h" #include "hw/char/pl011.h" #include "net/net.h" =20 @@ -485,7 +486,7 @@ static void create_ehci(const SBSAMachineState *sms) hwaddr base =3D sbsa_ref_memmap[SBSA_EHCI].base; int irq =3D sbsa_ref_irqmap[SBSA_EHCI]; =20 - sysbus_create_simple("platform-ehci-usb", base, + sysbus_create_simple(TYPE_PLATFORM_EHCI, base, qdev_get_gpio_in(sms->gic, irq)); } =20 diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index ed970273f3..9ccdc03095 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -29,7 +29,7 @@ #include "hw/loader.h" #include "hw/misc/zynq-xadc.h" #include "hw/ssi/ssi.h" -#include "hw/usb/chipidea.h" +#include "hw/usb/usb-hcd.h" #include "qemu/error-report.h" #include "hw/sd/sdhci.h" #include "hw/char/cadence_uart.h" diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index ac60d17a86..3f7cf0d1ae 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -37,7 +37,6 @@ #include "hw/i2c/smbus_eeprom.h" #include "hw/usb/usb.h" #include "hw/usb/usb-hcd.h" -#include "hw/usb/hcd-ehci.h" #include "hw/ppc/fdt.h" #include "hw/qdev-properties.h" #include "hw/pci/pci.h" diff --git a/hw/usb/chipidea.c b/hw/usb/chipidea.c index 3dcd22ccba..e81f63295e 100644 --- a/hw/usb/chipidea.c +++ b/hw/usb/chipidea.c @@ -11,6 +11,7 @@ =20 #include "qemu/osdep.h" #include "hw/usb/hcd-ehci.h" +#include "hw/usb/usb-hcd.h" #include "hw/usb/chipidea.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index 3730736540..b7debc1934 100644 --- a/hw/usb/hcd-ehci-sysbus.c +++ b/hw/usb/hcd-ehci-sysbus.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" #include "hw/usb/hcd-ehci.h" +#include "hw/usb/usb-hcd.h" #include "migration/vmstate.h" #include "qemu/module.h" =20 --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874618; cv=none; d=zohomail.com; s=zohoarc; b=AeU1+BMuz9Gf/MFCNZxvddf8lAKtp4AJ3Nw+V0n5WBdjEjN0Mat77yxVOlXRjl8goJ/qUsTBsIpm/bQyGUM7u296Am7IgBYi+VoY5DKUaRMI4kuFI4XqKEtxMfj10El6TGhCgWwSyD35NHDyAcpgUOAwvMqGEVnls4Mn8COOZaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874618; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ELz2xQrwO3as8Wxs/Kn8jW0b/kVDPOkqqjBqSxetIoY=; b=P/3nMwxZTKgGqNNjgOlvaqr7CygQQa0AYoJZfPV6M6crDsk1K+b8CRNNTOTL3H69CYMLIQajnOBeXKZDqMt+8gbH+egDVm5kt6sBxhr+0RFN6prw7zJrzqo2Bb6sHkFC7giX5hYM2sH6HgAk48nBdOWiUNdgFxRUxzPsrEClWCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874618471937.7740487186544; Sat, 4 Jul 2020 07:56:58 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjat-00053z-59; Sat, 04 Jul 2020 14:56:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjWE-0003ES-TR for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:54 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b927570e-be05-11ea-8496-bc764e2007e4; Sat, 04 Jul 2020 14:50:38 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id q15so34722183wmj.2 for ; Sat, 04 Jul 2020 07:50:38 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:36 -0700 (PDT) X-Inumbo-ID: b927570e-be05-11ea-8496-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ELz2xQrwO3as8Wxs/Kn8jW0b/kVDPOkqqjBqSxetIoY=; b=lEaSbT813203f5Q/sN2DPPZEN+/cTb3ulD0Tsc1K7UiiJmuIHRljgZA5E6zal6HQzd SJ1xW7NtSAKTID6CskQvsrLb7LQCq+tEKlaGrkyTbnWVNZv0iqk/rWKNzeml32LvPYt7 wgIMupaZdxlJI/+kIl0Ql/RW5EIXIoUpP0EIn+bP7T+ouYR5fkNExvJnsPSciKAgerQW WrzFOrM8q18cFGilFsVCB9yObwLMcIHNnP0LEH05SNx5uCwKd2r1O7S/Hqo/VTdOad/w ZbUVITTYcFraCPIbBmWczqxqNUrrLd09DJk+rTPqpM+lJ6rRdSpbb8Vxn63LhDrjM5CZ kfxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ELz2xQrwO3as8Wxs/Kn8jW0b/kVDPOkqqjBqSxetIoY=; b=ByzWdM8Doy738hoQVijAtSlJOmuZGqOyla+9JYJL7GSr2UiM1e0hHA/mBDQFYeMo7Y zkRHS/m0UQ8GR3/ZbEgFVa3fubx6qlxUj46XREacrmNtrdZktPMR7HtLoFgWhv12z3lN 2CVqLied2slRty60CXAqGPwfQJY9jM39VjPUXoROJufmQteS2zSrkkVNyQMtp8ENNVEB +wGy/tyXlJT479B2sNmNbv3xyYdYdfdV2j8zRb2KLGLIl63l7x0Gor/Zlewa7SMyx552 hXeOO854XoRDXeskVo/rLXq4ltfK3zXe7SCfwxeTmVGPz8VCo3HnSano0RdSL7rvoOex OV2w== X-Gm-Message-State: AOAM530iiWjrdqygYS4rqUu9H2KYblqRa67bzYGT/6/gax+Qhx6j9gyB 4Z1SkTlFNHDfCGiEiXV22Yk= X-Google-Smtp-Source: ABdhPJxszZnIT3VKXO6NXhl+YZ/Tp7y4xXuOBdXFlI7NLcqcetxqVubOW7Z948642pU/bk7Dmf0M6w== X-Received: by 2002:a1c:e355:: with SMTP id a82mr42855621wmh.165.1593874237478; Sat, 04 Jul 2020 07:50:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 24/26] hw/usb/usb-hcd: Use UHCI type definitions Date: Sat, 4 Jul 2020 16:49:41 +0200 Message-Id: <20200704144943.18292-25-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Various machine/board/soc models create UHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/usb/usb-hcd.h | 6 ++++++ hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 13 +++++++------ hw/isa/piix4.c | 3 ++- hw/mips/fuloong2e.c | 5 +++-- hw/usb/hcd-uhci.c | 19 ++++++++++--------- 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/include/hw/usb/usb-hcd.h b/include/hw/usb/usb-hcd.h index 74af3a4533..c9d0a88984 100644 --- a/include/hw/usb/usb-hcd.h +++ b/include/hw/usb/usb-hcd.h @@ -24,4 +24,10 @@ #define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb" #define TYPE_CHIPIDEA "usb-chipidea" =20 +/* UHCI */ +#define TYPE_PIIX3_USB_UHCI "piix3-usb-uhci" +#define TYPE_PIIX4_USB_UHCI "piix4-usb-uhci" +#define TYPE_VT82C686B_USB_UHCI "vt82c686b-usb-uhci" +#define TYPE_ICH9_USB_UHCI(n) "ich9-usb-uhci" #n + #endif diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 4d1de7cfab..0024c346c6 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -37,6 +37,7 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_ids.h" #include "hw/usb/usb.h" +#include "hw/usb/usb-hcd.h" #include "net/net.h" #include "hw/ide/pci.h" #include "hw/irq.h" @@ -275,7 +276,7 @@ static void pc_init1(MachineState *machine, #endif =20 if (pcmc->pci_enabled && machine_usb(machine)) { - pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci"); + pci_create_simple(pci_bus, piix3_devfn + 2, TYPE_PIIX3_USB_UHCI); } =20 if (pcmc->pci_enabled && x86_machine_is_acpi_enabled(X86_MACHINE(pcms)= )) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index b985f5bea1..a80527e6ed 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -51,6 +51,7 @@ #include "hw/ide/pci.h" #include "hw/ide/ahci.h" #include "hw/usb/usb.h" +#include "hw/usb/usb-hcd.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "sysemu/numa.h" @@ -68,15 +69,15 @@ struct ehci_companions { }; =20 static const struct ehci_companions ich9_1d[] =3D { - { .name =3D "ich9-usb-uhci1", .func =3D 0, .port =3D 0 }, - { .name =3D "ich9-usb-uhci2", .func =3D 1, .port =3D 2 }, - { .name =3D "ich9-usb-uhci3", .func =3D 2, .port =3D 4 }, + { .name =3D TYPE_ICH9_USB_UHCI(1), .func =3D 0, .port =3D 0 }, + { .name =3D TYPE_ICH9_USB_UHCI(2), .func =3D 1, .port =3D 2 }, + { .name =3D TYPE_ICH9_USB_UHCI(3), .func =3D 2, .port =3D 4 }, }; =20 static const struct ehci_companions ich9_1a[] =3D { - { .name =3D "ich9-usb-uhci4", .func =3D 0, .port =3D 0 }, - { .name =3D "ich9-usb-uhci5", .func =3D 1, .port =3D 2 }, - { .name =3D "ich9-usb-uhci6", .func =3D 2, .port =3D 4 }, + { .name =3D TYPE_ICH9_USB_UHCI(4), .func =3D 0, .port =3D 0 }, + { .name =3D TYPE_ICH9_USB_UHCI(5), .func =3D 1, .port =3D 2 }, + { .name =3D TYPE_ICH9_USB_UHCI(6), .func =3D 2, .port =3D 4 }, }; =20 static int ehci_create_ich9_with_companions(PCIBus *bus, int slot) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index f634bcb2d1..e11e5fae21 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -29,6 +29,7 @@ #include "hw/southbridge/piix.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" +#include "hw/usb/usb-hcd.h" #include "hw/sysbus.h" #include "hw/intc/i8259.h" #include "hw/dma/i8257.h" @@ -255,7 +256,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa= _bus, I2CBus **smbus) pci =3D pci_create_simple(pci_bus, devfn + 1, "piix4-ide"); pci_ide_create_devs(pci); =20 - pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci"); + pci_create_simple(pci_bus, devfn + 2, TYPE_PIIX4_USB_UHCI); if (smbus) { *smbus =3D piix4_pm_init(pci_bus, devfn + 3, 0x1100, isa_get_irq(NULL, 9), NULL, 0, NULL); diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 8ca31e5162..b6d33dd2cd 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -33,6 +33,7 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" +#include "hw/usb/usb-hcd.h" #include "qemu/log.h" #include "hw/loader.h" #include "hw/ide/pci.h" @@ -258,8 +259,8 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, dev =3D pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide"); pci_ide_create_devs(dev); =20 - pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); - pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); + pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), TYPE_VT82C686B_USB_UHCI= ); + pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), TYPE_VT82C686B_USB_UHCI= ); =20 *i2c_bus =3D vt82c686b_pm_init(pci_bus, PCI_DEVFN(slot, 4), 0xeee1, NU= LL); =20 diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 1d4dd33b6c..da078dc3fa 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -39,6 +39,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "usb-internal.h" +#include "hw/usb/usb-hcd.h" =20 #define FRAME_TIMER_FREQ 1000 =20 @@ -1358,21 +1359,21 @@ static void uhci_data_class_init(ObjectClass *klass= , void *data) =20 static UHCIInfo uhci_info[] =3D { { - .name =3D "piix3-usb-uhci", + .name =3D TYPE_PIIX3_USB_UHCI, .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82371SB_2, .revision =3D 0x01, .irq_pin =3D 3, .unplug =3D true, },{ - .name =3D "piix4-usb-uhci", + .name =3D TYPE_PIIX4_USB_UHCI, .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82371AB_2, .revision =3D 0x01, .irq_pin =3D 3, .unplug =3D true, },{ - .name =3D "vt82c686b-usb-uhci", + .name =3D TYPE_VT82C686B_USB_UHCI, .vendor_id =3D PCI_VENDOR_ID_VIA, .device_id =3D PCI_DEVICE_ID_VIA_UHCI, .revision =3D 0x01, @@ -1380,42 +1381,42 @@ static UHCIInfo uhci_info[] =3D { .realize =3D usb_uhci_vt82c686b_realize, .unplug =3D true, },{ - .name =3D "ich9-usb-uhci1", /* 00:1d.0 */ + .name =3D TYPE_ICH9_USB_UHCI(1), /* 00:1d.0 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI1, .revision =3D 0x03, .irq_pin =3D 0, .unplug =3D false, },{ - .name =3D "ich9-usb-uhci2", /* 00:1d.1 */ + .name =3D TYPE_ICH9_USB_UHCI(2), /* 00:1d.1 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI2, .revision =3D 0x03, .irq_pin =3D 1, .unplug =3D false, },{ - .name =3D "ich9-usb-uhci3", /* 00:1d.2 */ + .name =3D TYPE_ICH9_USB_UHCI(3), /* 00:1d.2 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI3, .revision =3D 0x03, .irq_pin =3D 2, .unplug =3D false, },{ - .name =3D "ich9-usb-uhci4", /* 00:1a.0 */ + .name =3D TYPE_ICH9_USB_UHCI(4), /* 00:1a.0 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI4, .revision =3D 0x03, .irq_pin =3D 0, .unplug =3D false, },{ - .name =3D "ich9-usb-uhci5", /* 00:1a.1 */ + .name =3D TYPE_ICH9_USB_UHCI(5), /* 00:1a.1 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI5, .revision =3D 0x03, .irq_pin =3D 1, .unplug =3D false, },{ - .name =3D "ich9-usb-uhci6", /* 00:1a.2 */ + .name =3D TYPE_ICH9_USB_UHCI(6), /* 00:1a.2 */ .vendor_id =3D PCI_VENDOR_ID_INTEL, .device_id =3D PCI_DEVICE_ID_INTEL_82801I_UHCI6, .revision =3D 0x03, --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874627; cv=none; d=zohomail.com; s=zohoarc; b=kjikDoer3v8IklLtWwIyazH+YF5i2/ATWW/6/ToWQbSKfqHIdralOMWzgW0uu1DahB6zIRMMvuUQu3KNac7d+Bw90T0bvt0yR5LTBMIr4jOoFh9HuWOk9m4ZB6iSeWmWwrorDBkSmDRgm+DR5aAAwD8rMiF8zTV1pEN7Ey4md+A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874627; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uFl2X6lG6vil8sEXKsbieCQlkH7+teoSNXY57sY2N5o=; b=TmRsrEamS+hjaWhb+GGdaI7n8TqakVsMCY2qj9AGJZq/aSxGZqEi1TLiQz9CWQ/t9ThnaDPTtXJM7fzJ8lzYGwNkutjlc/mNj9JH0SqzraB/XadLY7tZJ6+OGgcbBQm9yWavF9N/atiDWOBbuiPLML4FunsdsvUKOn746cEp4TQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874627481821.7430960581324; Sat, 4 Jul 2020 07:57:07 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjb1-0005IZ-Tr; Sat, 04 Jul 2020 14:56:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjWJ-0003ES-Tc for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:51:59 +0000 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ba56aea4-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:40 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id o2so37045535wmh.2 for ; Sat, 04 Jul 2020 07:50:40 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:39 -0700 (PDT) X-Inumbo-ID: ba56aea4-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uFl2X6lG6vil8sEXKsbieCQlkH7+teoSNXY57sY2N5o=; b=pEPq0tBtl3XW/xKrGA5imilI9ZmVHCddD6JX7pQf5W26Rrv3j0GgA9nuE3yRIkzKmh xHXVt9A0O2Sb6wPcOQhczgtzphR+PeHVZ4Fdijl43Nrxg+v0v2Hz13FZ7aE8sOrKMSba lfG8A6MMb+bM+xNdOi2/2GPMz+xyBlp2BCeJ2lrXsutgPmG7wdmm6i+UpuNi8+BMpdVg eiQN9k6197cbsfvPjRB78ybOhM3ezQzyqGNS+gSkzZo/tgdWfPLh9B5gQMHqP+XuG+Vf +5B1ATevPKzMRin82a+Fpe8eN19U96Tx56oDwDoz3bikVgrPUqsQH6eHcCsfnf4o51sH T5uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uFl2X6lG6vil8sEXKsbieCQlkH7+teoSNXY57sY2N5o=; b=N0xpKeuxnVk3Dtu9VqSxa1h5OCWxxjzF5sYKtTUwOnVU8lm3EHaMIKTe5POQ818WUU xaUdrvj9WncibSVLwWfWtsUMBlRYPCZfiEnvDvrxXSsfhIcu1CpN3n75qOi7L3e21wCb Kjelh37NH9v9uOTOO4IsyVxqlD88SgU9mwZ//bZwaGJqlSt/xCsv+wWpsvARapY7eBvx pglUWPkKdmBSnOBsgUScxzMQS4DUlkwfCJvK5GGvOrNa9RxzfBtdBP3zLcu2f2SzFkRl Hi6I4W0cb9KN6PLHvnKcEu3fj7r/VcjVXwLvd1cV/cM7aP4hhFTNCnzf9EyOVwAKFe0s Rj1Q== X-Gm-Message-State: AOAM5310KX1BMWMrmz3NQIaajp8PBB7TOjQpA2UbfKl1i+SmcG1/uZp+ G8pbaips41w97JesXGetIYE= X-Google-Smtp-Source: ABdhPJzM4tGe90D+YYy5lfrAPXqvO73Nu2kMmuLd9RH15Fay5P8lwxNw5t/4Uu8mV3OZMnQRXn0t1A== X-Received: by 2002:a7b:c44d:: with SMTP id l13mr43119938wmi.66.1593874239587; Sat, 04 Jul 2020 07:50:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 25/26] hw/usb/usb-hcd: Use XHCI type definitions Date: Sat, 4 Jul 2020 16:49:42 +0200 Message-Id: <20200704144943.18292-26-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Various machine/board/soc models create XHCI device instances with the generic QDEV API, and don't need to access USB internals. Simplify header inclusions by moving the QOM type names into a simple header, with no need to include other "hw/usb" headers. Suggested-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/usb/hcd-xhci.h | 2 +- include/hw/usb/usb-hcd.h | 3 +++ hw/ppc/spapr.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index f9a3aaceec..b6c54e38a6 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -23,9 +23,9 @@ #define HW_USB_HCD_XHCI_H =20 #include "usb-internal.h" +#include "hw/usb/usb-hcd.h" =20 #define TYPE_XHCI "base-xhci" -#define TYPE_NEC_XHCI "nec-usb-xhci" #define TYPE_QEMU_XHCI "qemu-xhci" =20 #define XHCI(obj) \ diff --git a/include/hw/usb/usb-hcd.h b/include/hw/usb/usb-hcd.h index c9d0a88984..56107fca62 100644 --- a/include/hw/usb/usb-hcd.h +++ b/include/hw/usb/usb-hcd.h @@ -30,4 +30,7 @@ #define TYPE_VT82C686B_USB_UHCI "vt82c686b-usb-uhci" #define TYPE_ICH9_USB_UHCI(n) "ich9-usb-uhci" #n =20 +/* XHCI */ +#define TYPE_NEC_XHCI "nec-usb-xhci" + #endif diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index db1706a66c..d8b3978f24 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2961,7 +2961,7 @@ static void spapr_machine_init(MachineState *machine) if (smc->use_ohci_by_default) { pci_create_simple(phb->bus, -1, TYPE_PCI_OHCI); } else { - pci_create_simple(phb->bus, -1, "nec-usb-xhci"); + pci_create_simple(phb->bus, -1, TYPE_NEC_XHCI); } =20 if (spapr->has_graphics) { --=20 2.21.3 From nobody Sun Apr 28 21:58:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1593874616; cv=none; d=zohomail.com; s=zohoarc; b=eDLzQcKh0x1mhMz8vyyfXQ0/XQuQhIwiwjaZnvjklRJFdZg+viKHfcU4FTYUzjhQ8Bdnh0xOeGpGcGpD/nl5G8NUwM1BeZNP21W/RFQkPhoeoFDooDzTpCqZ3eZ7p5aQOk9wttQ17qGPKt9G1azL00Mp5pAiUJejtXU8AfALvEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593874616; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uE7YqG+qACaG8Uud6yeGxAsfWVnV3rkTeBq37HQj1qo=; b=PIaQ5qboRRFMSsLlwTz+kvAcz2vZYIwrsFmrbK9uW0G/Ezjlag3UqrmcOfizql2BhMj+T2tAKTgp5CJo2BPUQdWt/db58kAOIzTluD9cmr6sTCd9AWZyXtayRRUOSFZ9XJKbYvBiAi5sjgX/rMsYiUhtFHz79ZyARfhalI72saw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1593874616243102.59364600458866; Sat, 4 Jul 2020 07:56:56 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjat-00054J-Dy; Sat, 04 Jul 2020 14:56:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jrjWO-0003ES-Tr for xen-devel@lists.xenproject.org; Sat, 04 Jul 2020 14:52:04 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id bb939dcc-be05-11ea-bca7-bc764e2007e4; Sat, 04 Jul 2020 14:50:42 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id b6so35748311wrs.11 for ; Sat, 04 Jul 2020 07:50:42 -0700 (PDT) Received: from localhost.localdomain (1.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.1]) by smtp.gmail.com with ESMTPSA id r10sm17135019wrm.17.2020.07.04.07.50.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 07:50:41 -0700 (PDT) X-Inumbo-ID: bb939dcc-be05-11ea-bca7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uE7YqG+qACaG8Uud6yeGxAsfWVnV3rkTeBq37HQj1qo=; b=sIhGHE4QN5ORR+3/Mgnoaxt2dRH9Duka3DMpiaQTVgS1lpSJEJ8KEB4VjCSKQqSlfc HwpmkE15woH+abTAT5VLKiyhb0Zq+u1XvalFXiALNHpXyYLuDGhlcjr3PJjaoEf3+FY7 4UjhgJzhzYvcqHRKWwR/aqKYvEyqZ1yrs8FGt1f9ohuKcUlxQe/dtogbIP9H2gOPTdM+ X1mnhOjui1Vk5B+Xa4Ju6b+X93HolCAPQsIP0PCVa5noiOK0+NH5/fSK60TLZZ4znABy cKKta1I+QCL7DFqQUZxr5qs5kGd/t289lAxS+UdQKR8b+NnivhadaJIHkJJVNpWJ4AOo xV1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uE7YqG+qACaG8Uud6yeGxAsfWVnV3rkTeBq37HQj1qo=; b=BliaDKB+yVVOwZmDb8XSgmOZ+8Q6LzESelP7O/Y4C+k7ABU+IwZMztWdVTwVo2hKJl v/lzsbrzUR9gANXd8un2oIV6ztb5IQiPIvQtOv9e3ZVg4qtW6zsJ8e9GjsNykxMB20uz /3WaANDkAR5EYazCqy6G5wGq3MLR+K8XMLXm/jYcyXD848xVYtvqh2mYUNb3Dglzws3O RiLus8U7zmNrNhpQpjQdD85gXTyl9PTjvzmLFkbyQlJBlP6lZdFD4oqDLHxCS1PvOFZN KrybYzzKFgu8lz2VlOf+HRGxCZNdOEa7ws/81Ys9YRzvCdT/5x4P4KBWVCIAJW91qjXi ZITQ== X-Gm-Message-State: AOAM533+cHJPRdAXI+pl0TJtGOyEGypK82tb2tzr4C69lrg+AKY3tydt Ejf/GbpeLpYJ1q+NLMmfrkQ= X-Google-Smtp-Source: ABdhPJw68YNz9StYiIER/Bcj0m+eoPkR5IWJU/SRvblSzDy3zWSMVqWNGeAGRScY2s+A4+/iXWgZVA== X-Received: by 2002:adf:9561:: with SMTP id 88mr11043924wrs.240.1593874241665; Sat, 04 Jul 2020 07:50:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, BALATON Zoltan Subject: [PATCH 26/26] MAINTAINERS: Cover dwc-hsotg (dwc2) USB host controller emulation Date: Sat, 4 Jul 2020 16:49:43 +0200 Message-Id: <20200704144943.18292-27-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200704144943.18292-1-f4bug@amsat.org> References: <20200704144943.18292-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Mark Cave-Ayland , Jiaxun Yang , Gerd Hoffmann , "Edgar E. Iglesias" , Huacai Chen , Stefano Stabellini , xen-devel@lists.xenproject.org, Yoshinori Sato , Paul Durrant , Magnus Damm , Markus Armbruster , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , Samuel Thibault , Leif Lindholm , Andrzej Zaborowski , Aleksandar Rikalo , Eduardo Habkost , Alistair Francis , "Dr. David Alan Gilbert" , Beniamino Galvani , Niek Linnenbank , qemu-arm@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Add an section for the dwc2 host controller emulation introduced in commit 153ef1662c. Cc: Paul Zimmerman Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Paul Zimmerman --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2566566d72..e3f895bc6e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1651,6 +1651,12 @@ M: Samuel Thibault S: Maintained F: hw/usb/dev-serial.c =20 +USB dwc-hsotg (dwc2) +M: Gerd Hoffmann +R: Paul Zimmerman +S: Maintained +F: hw/usb/*dwc2* + VFIO M: Alex Williamson S: Supported --=20 2.21.3