From patchwork Sat Jul 4 14:49:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11643741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D0E214B7 for ; Sat, 4 Jul 2020 14:57:19 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 494E82158C for ; Sat, 4 Jul 2020 14:57:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pEPq0tBt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 494E82158C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org 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 X-Inumbo-ID: ba56aea4-be05-11ea-bca7-bc764e2007e4 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) 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) 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) From: =?utf-8?q?Philippe_Mathieu-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 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_Poussineau?= , 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_Lureau?= , Richard Henderson , Radoslaw Biernacki , Igor Mitsyanko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paul Zimmerman , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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é --- 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 #include "usb-internal.h" +#include "hw/usb/usb-hcd.h" #define TYPE_XHCI "base-xhci" -#define TYPE_NEC_XHCI "nec-usb-xhci" #define TYPE_QEMU_XHCI "qemu-xhci" #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 +/* 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); } if (spapr->has_graphics) {